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.
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
...
}
在 lanch.json 中添加这个 "stopOnEntry": true
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.