5

Pretty much what the title says, I would like to be able to connect to a python process running under paster or uwsgi and utilize pdb functionality.

Tony
  • 2,037
  • 3
  • 22
  • 22

1 Answers1

2

Using winpdb, you can attach to a running process like this:

  1. Insert

    import rpdb2; rpdb2.start_embedded_debugger('mypassword')
    

    inside your script.

  2. Launch your script (through paster or uwsgi) as usual.
  3. Run winpdb
  4. Click File>Attach
  5. Type in password (e.g. "mypassword"), select the process.
  6. To detach, click File>Detach. The script will continue to run, and can be attached to again later.
unutbu
  • 842,883
  • 184
  • 1,785
  • 1,677