

#Script debugger add sdef code#
Step Over button will take the debugger from the current line to the next line in the code (in our case, the print statement).Continue button will take the debugger from the current breakpoint (or red filled circle) to the next red filled circle (since in our case there is a for loop, the next breakpoint will again be at the for loop).(Everything up until this point has been processed and that’s why you see os module as part of the Variables tab.)įrom hereon, you have a few debugging options as part of the debug toolbar: The debugger has not yet processed the line at which the breakpoint was added.On the right, the line at which the first breakpoint was added is highlighted in yellow in the script.On the left, the Variables tab is populated with some local and global variables.For now, it contains a hello.py script and a small dummy audio_data dataset containing 5 audio files. For more information, feel free to check out their official documentation. Here’s sharing the same with you! Basics of VSCode debuggerįor sake of brevity, I am going to keep things simple and discuss enough details to get you started. This was the main motivation behind learning all nitty-gritty that VS Code has to offer for debugging code. Having said that, it’s not a sustainable solution when working with larger projects - involving a buttload of third-party packages, util folders, directories, sub-directories - where it’s easy to lose track of the code flow. If it works, it works (especially for smaller scripts)!

Quick pulse check - Still using print() statements to debug your code? Hey, no shame in admitting if you do. Watch variables, use conditional breakpoints, call stack, exception breakpoint, etc- when working on larger projects
