Wednesday, June 14, 2017

rpdb2 without winpdb

rpdb2 can be used by dropping the rpdb2.py script in the root directory of the remote project then placing the
import rpdb2; rpdb2.start_embedded_debugger('asdf',fAllowRemote=True)
command in the running service. You can then attach to the service when it debugs by using the rpdb2.py command as well, but via the command line with
python -c "import rpdb2; rpdb2.main()"

Then from there do

  > password "asdf"
 Password is set to: "asdf"

 > attach
 Connecting to 'localhost'...
 Scripts to debug on 'localhost':

    pid    name
 --------------------------
    7772   myscript.py

 > attach 7772
 > *** Attaching to debuggee...
 > *** Debug Channel is encrypted.
 > *** Successfully attached to
 > *** 'myscript.py'.
 > *** Debuggee is waiting at break point for further commands.

 > go

No comments:

Post a Comment