Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to launch winpdb from a Python script?

When I have to deal with bugs in Python code, I often insert breakpoints so during execution I'm being dropped into the debuger when a breakpoint is reached. I've been mostly using pdb (command line) and pudb (ncurses interface).

Is it possible to launch winpdb instead in such situation? What's the breakpoint code I shall include in my python script so winpdb would get started?

Edit: I'm using a simple text editor (vim) for writing code. Please do not suggest me to use an IDE instead, which has winpdb integrated or has its own GUI debuger that is similar to winpdb.

like image 339
Alex_coder Avatar asked Oct 14 '22 10:10

Alex_coder


1 Answers

Winpdb is normally used so that you run the script with winpdb:

 winpdb myscript.py

If you want to start it from "inside" python instead, the documentation on how to do that is here: http://winpdb.org/docs/embedded-debugging/

like image 93
Lennart Regebro Avatar answered Oct 20 '22 02:10

Lennart Regebro