Note that there are some explanatory texts on larger screens.

plurals
  1. POEmacs: methods for debugging python
    primarykey
    data
    text
    <p>I posted this on <a href="https://softwareengineering.stackexchange.com/questions/29844/emacs-methods-for-debugging-python">programmers.stackexchange.com</a>, but I figured it may be more appropriate on SO. </p> <p>I use emacs for all my code edit needs. Typically, I will use M-x compile to run my test runner which I would say gets me about 70% of what I need to do to keep the code on track however lately I've been wondering how it might be possible to use M-x pdb on occasions where it would be nice to hit a breakpoint and inspect things.</p> <p>In my googling I've found <a href="http://twistedmatrix.com/documents/10.1.0/core/howto/debug-with-emacs.html" rel="nofollow noreferrer">some things</a> that suggest that this is useful/possible. However I have not managed to get it working in a way that I fully understand. </p> <p>I don't know if it's the combination of buildout + appengine that might be making it more difficult but when I try to do something like </p> <pre><code>M-x pdb Run pdb (like this): /Users/twillis/projects/hydrant/bin/python /Users/twillis/bin/pdb /Users/twillis/projects/hydrant/bin/devappserver /Users/twillis/projects/hydrant/parts/hydrant-app/ </code></pre> <p>Where .../bin/python is the interpreter buildout makes with the path set for all the eggs.</p> <p>~/bin/pdb is a simple script to call into pdb.main using the current python interpreter</p> <pre><code>HellooKitty:hydrant twillis$ cat ~/bin/pdb #! /usr/bin/env python if __name__ == "__main__": import sys sys.version_info import pdb pdb.main() HellooKitty:hydrant twillis$ </code></pre> <p>.../bin/devappserver is the dev_appserver script that the buildout recipe makes for gae project and .../parts/hydrant-app is the path to the app.yaml</p> <p>I am first presented with a prompt</p> <pre><code>Current directory is /Users/twillis/bin/ C-c C-f </code></pre> <p>Nothing happens but </p> <pre><code>HellooKitty:hydrant twillis$ ps aux | grep pdb twillis 469 100.0 1.6 168488 67188 s002 Rs+ 1:03PM 0:52.19 /usr/local/bin/python2.5 /Users/twillis/projects/hydrant/bin/python /Users/twillis/bin/pdb /Users/twillis/projects/hydrant/bin/devappserver /Users/twillis/projects/hydrant/parts/hydrant-app/ twillis 477 0.0 0.0 2435120 420 s000 R+ 1:05PM 0:00.00 grep pdb HellooKitty:hydrant twillis$ </code></pre> <p>something is happening</p> <pre><code>C-x [space] </code></pre> <p>will report that a breakpoint has been set. But I can't manage to get get things going. </p> <p>It feels like I am missing something obvious here. Am I? </p> <p>So, is interactive debugging in emacs worthwhile? is interactive debugging a google appengine app possible? Any suggestions on how I might get this working?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload