microsoft / debugpy

An implementation of the Debug Adapter Protocol for Python
https://pypi.org/project/debugpy/
Other
1.8k stars 131 forks source link

Python debugger breakpoints are not working. #1630

Open weizjajj opened 1 month ago

weizjajj commented 1 month ago

When debugging my Python program, the first few breakpoints function properly, but subsequent breakpoints fail to work. python_work my launch.json

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python 调试程序: 当前文件",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "internalConsole",
            "cwd": "${fileDirname}",
            "justMyCode": true,
            "subProcess": true,
            "python": "${command:python.interpreterPath}",
            "env":{
                 "PYTHONPATH": "${workspaceFolder}"
            }
        }
    ]
}

python version: Python 3.11.9 Python Debugger Version: v2024.9.12001014 (pre-release) Python: v2024.11.2024071802 (pre-release)

rchiodo commented 1 month ago

I would suspect that the instance.run is never returning? Do the print statements after that point actually execute?