Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching python debugger fails in rarely #179

Open
cedric-fauth opened this issue Dec 5, 2023 · 7 comments
Open

Attaching python debugger fails in rarely #179

cedric-fauth opened this issue Dec 5, 2023 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug needs spike

Comments

@cedric-fauth
Copy link

cedric-fauth commented Dec 5, 2023

Type: Bug

Behaviour

Expected vs. Actual

The following launch config sometimes fails but port is open and the debugee process is waiting for the debugger to attach:
image

        {
            "name": "Manual: Attach debugger",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "127.0.0.1",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "."
                }
            ],
            "justMyCode": false,
            "logToFile": true,
            "redirectOutput": true,
            "django": true
        },

Steps to reproduce:

  1. Cannot be reproduced even not by me it just happens sometimes when intensively using a python process and the debugger.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.2
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2023-12-05 15:15:02.885 [error] Cannot read properties of undefined (reading 'defaultEncoding'): TypeError: Cannot read properties of undefined (reading 'defaultEncoding')
    at _write (node:internal/streams/writable:294:24)
    at Writable.write (node:internal/streams/writable:337:10)
    at u.log (/home/vscode/.vscode-server/extensions/ms-python.python-2023.20.0/out/client/extension.js:2:345214)
    at u.onWillStopSession (/home/vscode/.vscode-server/extensions/ms-python.python-2023.20.0/out/client/extension.js:2:344975)
    at /vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:122:386
    at Array.forEach (<anonymous>)
    at m.onWillStopSession (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:122:353)
    at a.$stopDASession (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:121:9917)
    at i.N (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:117:10813)
    at i.M (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:117:10579)
    at i.H (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:117:9660)
    at i.G (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:117:8736)
    at n.value (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:117:7566)
    at m.w (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:1902)
    at m.fire (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:2119)
    at v.fire (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:79:13940)
    at n.value (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:136:7901)
    at m.w (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:1902)
    at m.fire (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:2119)
    at v.fire (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:79:13940)
    at s.z (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:79:17005)
    at n.value (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:79:16410)
    at m.w (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:1902)
    at m.fire (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:2119)
    at n.acceptChunk (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:79:11714)
    at n.value (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:79:11001)
    at m.w (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:1902)
    at m.fire (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:63:2119)
    at m.u (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:133:19093)
    at m.acceptFrame (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:133:18899)
    at a.l (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:133:17532)
    at /vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:133:14879
    at Socket.p (/vscode/vscode-server/bin/linux-x64/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/out/vs/workbench/api/node/extensionHostProcess.js:133:12793)
    at Socket.emit (node:events:513:28)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
2023-12-05 15:15:12.404 [error] Error while getting the engine for the version 0.6.0. Server returned 404```

</p>
</details>

<details>

<summary>User Settings</summary>

<p>

languageServer: "Pylance"

testing
• pytestEnabled: true


</p>
</details>


Extension version: 2023.20.0
VS Code version: Code 1.84.2 (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:51:52.184Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2


<!-- generated by issue reporter -->
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 5, 2023
@paulacamargo25 paulacamargo25 transferred this issue from microsoft/vscode-python Jan 22, 2024
@paulacamargo25
Copy link
Contributor

Hin @cedric-fauth, thanks for your bug report, could you try in insiders using the new Python Debugger extension? Thanks

@daniel-westerfeld
Copy link

I also get this error @paulacamargo25 and it is extremely annoying. Anything one can do about it?

@paulacamargo25
Copy link
Contributor

Thanks for the issue report @daniel-westerfeld , could you send me your launch.json config and the output of the Python Debugger Extension?

@paulacamargo25 paulacamargo25 added the info-needed Issue requires more information from poster label Jun 1, 2024
Copy link

Hey @karthiknadig, this issue might need further attention.

@cedric-fauth, you can help us out by closing this issue if the problem no longer exists, or adding more information.

@cedric-fauth
Copy link
Author

The problem still exists, but I don't know what more information to provide.

Copy link

Hey @karthiknadig, this issue might need further attention.

@cedric-fauth, you can help us out by closing this issue if the problem no longer exists, or adding more information.

Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2024
@karthiknadig karthiknadig reopened this Nov 9, 2024
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug needs spike and removed triage-needed Needs assignment to the proper sub-team info-needed Issue requires more information from poster labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug needs spike
Projects
None yet
Development

No branches or pull requests

4 participants