When you click Run and Debug for the first time, you will get the option to select a debug configuration. Breakpoints are helpful for debugging purposes because they allow the programmer to check the values of variables and see how the program is executing at that point. If you click on this dot, it will set a breakpoint.Ī breakpoint is a point in the code where the program’s execution will stop temporarily so that the program’s state can be examined. A faded red dot will appear when you hover over on the left-hand side of the line number. In our case, it is the file with the code example above. Open up the Python file you want to debug. Alternatively, VSCode may simply make the selection for you and automatically generate a JSON file. When you click Create a launch json file again, a Python option should become available. Under normal circumstances, you shouldn’t have to restart VSCode after installing the Python debug extension. (Sidenote: if you have time, check out other extensions for Python in VS Code.) Click the Install button to add it to your VSCode instance. Select the first one, Microsoft’s official Python extension for Visual Studio Code. Regardless of what you choose, it will bring up similar, if not the same results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |