I am trying to learn how to use break points.
As you can see in below screenshot, the program didn't stop at break point and the variables window is empty.
I press the button in orange circle. I have also tried press F5 Start debugging. Both have same result.
What could be the problem?
Here is my code. There is no error message. The program run from line 1 to line 9 without error.
a = 33
b = 200
if b>a:
print("b is larger than b")
c = 1000
d = 9999
if d>c:
print("d is larger than c")
Here is my debug configuration launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
test.py
file INSIDE the python interpreter directory with thepython.exe
. First place the VSC workspace OUTSIDE the python interpreter directory. Your file is seen as part of the python libs, it is INSIDE the python interpreter directory, you have thejustMyCode:true