Running Python Debugger in VS Code Not Stopping at Breakpoints

44 Views Asked by At

I have a python venv and I'm running the following code within VS Code:

text = "hello"
print(text)

I'm trying to break at text = "hello", my launch.json file is:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Debug Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "stopOnEntry": true,
            "justMyCode": false
        },
    ]
}

The VS Code terminal commands are:

c:\Programming\Python\VEnv_Python310\Scripts\python.exe' 'c:\Users\lautry\.vscode\extensions\ms-python.python-2024.2.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '60718' '--' 'C:\Programming\Python\VEnv_Python310\test.py'

The debugger isn't stopping at my breakpoints.

1

There are 1 best solutions below

0
JialeDu On

First, mark a breakpoint in print(text)

enter image description here

Then click the triangle button in the dndn panel to start debugging.

enter image description here