microsoft / microsoft/vscode-python-debugger
Incorrect debugpy command selected in terminal
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 181
- Fork
- 126
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
Before creating a new issue, please check the FAQ to see if your question is answered there.
Notes
We have debugpy python package installed locally and running debugpy in the VSCode terminal selects the local installation instead of the bundled extension wrapper in .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy. This broke since debugpy 1.8.5, which added the debugpy script to the python package. This happens because the extension wrapper path is added to the end of PATH rather than beginning. Can the extension be modified to prepend the bundled path to the front of PATH instead?
Environment data
- debugpy version: 1.8.16 (run
import debugpy; print(debugpy.__version__)if uncertain) - OS and version: Red Hat Enterprise Linux 8.10 (Ootpa)
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.13
- Using VS Code or Visual Studio: Yes
Actual behavior
In VSCode terminal when we run debugpy <python-filename>. Instead of attaching a debugger, it gives us the help menu.
Expected behavior
Running debugpy <filename> should select the debugy version bundled with the ms-python.debugpy extension and attach the debugger.
Steps to reproduce:
- Install Debugpy version
1.8.16on the system using pip. - Open the project in VSCode
- Download the Python Debugger Extension (@id:ms-python.debugpy) V2025.18.0
- Try debugging a python file by running
debugpy <filename>in VSCode Terminal.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách lần theo mã của extension bổ sung đường dẫn đi kèm .vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts/debugpy vào PATH của terminal VS Code. Tái hiện vấn đề với debugpy 1.8.16 và xác minh rằng việc đặt đường dẫn này lên trước khiến debugpy <filename> attach debugger thay vì hiển thị menu trợ giúp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, typescript, vscode
- Lĩnh vực
- cli, devtools
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100