Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Attaching python debugger fails in rarely

Đang mở
#179 7 bình luận 1 reaction 1 người được giao Xem trên GitHub

@karthiknadig đang làm issue này rồi.

Từ ngày 8/8/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug needs spike

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 (View→Output, 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 -->
Ngôn ngữ chính
TypeScript
Star
181
Fork
126
Merge trung bình
8 giờ 49 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-python-debugger

Tất cả issue của microsoft/vscode-python-debugger

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.