Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Further to my comment earlier, and your subsequent update to the question:</p> <p>First figure out a value for <code>$PATH</code> that works in your terminal. Use <code>which pdb</code> to find where the <code>pdb</code> executable is located.</p> <p>Then, set the <code>$PATH</code> environment variable explicitly in Emacs, and sync it to <code>exec-path</code> as follows:</p> <pre><code>(setenv "PATH" "/usr/local/bin:/usr/bin:/bin:/some/other/dir") (setq exec-path (split-string (getenv "PATH") path-separator)) </code></pre> <p>It's possible you would need to also explicitly set <code>PYTHONPATH</code> or similar environment variables; you can do that using lines like the "setenv" line above, or just use the <a href="https://github.com/purcell/exec-path-from-shell" rel="nofollow">exec-path-from-shell elisp package</a>.</p> <p><em>Update</em></p> <p>Okay, so it turns out Emacs' <code>pdb</code> command isn't provided by <code>python-mode</code>, and it expects to find an executable called "pdb". The easy way to fix this, then is to create a shell wrapper called "pdb", in a directory on your $PATH:</p> <pre><code>#!/bin/sh exec python -m pdb "$@" </code></pre> <p>(I found a note <a href="http://wiki.python.org/moin/EmacsEditor" rel="nofollow">here</a> suggesting this technique.)</p> <p>The equivalent under Windows would be a file called pdb.bat, containing:</p> <pre><code>python -u -m pdb %1 </code></pre> <p>(The <code>-u</code> prevents Python from buffering its output.)</p>
 

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