3 ms·
You know what helped me with python? Breakpoints inside vscode's module. It all just kinda clicked.
by collsni 5y ago
You know what helped me with python? Breakpoints inside vscode's module. It all just kinda clicked.
- yuy910616 5y agopython actually has a build-in `breakpoint()` function. I think it brings up a repl at the line. I've been using that instead of print debug, it's been great.
- int_19h 5y agoIt's actually customizable via the PYTHONBREAKPOINT environment variable and sys.breakpointhook(). The default does pdb.set_trace(), which gives you a built-in debugger prompt (not a REPL) at that location. But it can be set to execute arbitrary code, and most Python IDEs make it behave like "normal" breakpoints.