I'm fairly new to python and to date I've been using Komodo as my interpreter. I decided to try something more robust, so I installed Visual Studio Code version 1.23.1 and I'm running Python 3.6.4. When I run a basic script it runs properly, but I noticed in the debugger window none of the variables appear, in fact nothing appears. Not sure what I've done wrong. The debug is set to DEBUE Python: Current File.
1 Answer
By default VSCode's debugger will execute your file until it either encounters a breakpoint (or exception) or your program exits. To change this behavior, set "stopOnEntry": true your launch.json configuration like so:
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
// Add this line
"stopOnEntry": true
},
// other configurations
...
}