

The current line is indicated with a yellow arrow in the left margin. Because stopOnEntry is set to true, the debugger stops on the first line of the file. If you’re still in launch.json & press F5, compiler will return error of invalid attributes in launch.jsonbbecause it tries to run launch.json as current file. Switching to hello.py in the editor is the key. But it keeps saying Python is not installed when starting VS Code. in the bottom right corner prompting you to install the Python extension. I can run both python -version and python3 -version in the terminal inside VS Code and it works. Save launch.json, switch to hello.py in the editor, then run the debugger by selecting the green arrow in the Debug toolbar or pressing F5. This makes VS Code great for anything from simple Python scripting to denser.


To automatically stop the debugger on the first line when the program starts, add a "stopOnEntry": true setting to the "Python: Current File" configuration in launch.json, so that the whole configuration appears as follows: , Select “Python: Current File”, which is the configuration that runs the current file shown in the editor using the currently selected Python interpreter. For courses using Python you will need Python and Python Extension for VS Code to run your source code.
