Step by step
- Choose Python and paste your code Select Python in the IDE and paste your script. If it calls input(), type the answers in the Input box, one per line.
- Click line numbers for breakpoints Click the number next to a line to stop there. You can also type break 8 in the console.
- Press Debug The script runs to the first breakpoint. With no breakpoint, it stops on the first line.
- Step through Next runs the line, Step enters a function you call, Finish runs to the end of the current function and Continue runs to the next breakpoint.
- Read the variables Lists, dicts, objects and strings show their contents. Values that changed on the last step are highlighted; click a frame in the call stack to see its own variables.
When your script raises an error
Run shows the traceback just like python main.py does, and the editor marks the failing line. Debug the same script to stop before that line and inspect the values that caused the error, then use reverse-step to see how they got there.
Compared with pdb
Python’s built-in debugger, pdb, uses the same ideas: break, next, step, continue and p. Online GDB Pro shows them as buttons and panels and records the run, so you can also step backwards. Programs run with the standard library; packages that need to be installed with pip are not available.