Debug isn't working

At some point, a while back (maybe when I upgraded to 3.3?) the debugger for one of pycharm projects quit working. I can run it just fine. But when i try to debug it, I get an:

__exception__ = {tuple}(<class 'KeyError'>, ('radio',), <traceback object at 0x1017de4d0>).

I have no idea what it means or why, i've messed with my imports, simplified them, but to no avail. Is this perhaps an issue with pycharm. I'm not enough of a pycharm expert (yet) to dig deeper to figure out what's going wrong.

Any help or hints would be greatly appreciated.
Comment actions Permalink
Hi Travis! Could you please set environment variable PYCHARM_DEBUG=True in your run configuration and provide full output after you debug your program. It is possible that the problem deals with exception breakpoints, so if you turn them off (Run | View breakpoints -> Python Exception breakpoints) it can fix the problem.
Comment actions Permalink
Here's the output Dmitry (I am running pycharm 2.6.2 with Python3.3 on OSX 10.8):

/Library/Frameworks/Python.framework/Versions/3.3/bin/python3 /Applications/ –multiproc –client –port 56305 –file /Users/travisg/PycharmProjects/RadioSimulate/
Started in multiproc mode
('Connecting to ', '', ':', '56305')
('received command ', '99\t-1\t56306')
Received port 56306
pydev debugger: process 58545 is connecting
('Connecting to ', '', ':', '56306')
Connected to pydev debugger (build 121.378)
received >>99    -1    56306
command >>99    -1    56306<<
received >>501    1    0.1    UNIX
command >>501    1    0.1    UNIX<<
received >>122    3    BaseException    1    1
command >>122    3    BaseException    1    1<<
('received command ', '501\t1\t0.1\tUNIX')
sending cmd: CMD_VERSION 501    1    %40%40BUILD_NUMBER%40%40

('received command ', '122\t3\tBaseException\t1\t1')
Exceptions to hook on terminate: {'BaseException': <pydevd_breakpoints.ExceptionBreakpoint object at 0x1017ca210>}
Exceptions to hook always: {'BaseException'}
('received command ', '101\t5\t')
received >>101    5    
command >>101    5    <<
sending cmd: CMD_THREAD_CREATE 103    2    <xml><thread name="pydevd.reader" id="-1"/></xml>

sending cmd: CMD_THREAD_CREATE 103    4    <xml><thread name="pydevd.writer" id="-1"/></xml>

sending cmd: CMD_THREAD_CREATE 103    6    <xml><thread name="MainThread" id="pid58545_seq1" /></xml>

sending cmd: CMD_THREAD_SUSPEND 105    8    <xml><thread id="pid58545_seq1" stop_reason="122" message="BaseException"><frame id="4299298496" name="_get_module_lock" file="/Users/travisg/PycharmProjects/RadioSimulate/%253Cfrozen importlib._bootstrap>" line="272">"</frame><frame id="4316666048" name="_find_and_load" file="/Users/travisg/PycharmProjects/RadioSimulate/%253Cfrozen importlib._bootstrap>" line="1553">"</frame><frame id="4326431760" name="%26lt%3Bmodule%26gt%3B" file="/Users/travisg/PycharmProjects/RadioSimulate/" line="1">"</frame><frame id="4326441296" name="execfile" file="/Applications/" line="37">"</frame><frame id="4326429856" name="run" file="/Applications/" line="1103">"</frame><frame id="4299680848" name="%26lt%3Bmodule%26gt%3B" file="/Applications/" line="1457">"</frame></thread></xml>

('received command ', '114\t7\tpid58545_seq1\t4299298496\tFRAME')
received >>114    7    pid58545_seq1    4299298496    FRAME
command >>114    7    pid58545_seq1    4299298496    FRAME<<
('processing internal command ', '<pydevd_comm.InternalGetFrame object at 0x1017cafd0>')
sending cmd: CMD_GET_FRAME 114    7    <xml><var name="__exception__" type="tuple" value="tuple%253A %2528%253Cclass %2527KeyError%2527%26gt%3B%252C %2528%2527radio%2527%252C%2529%252C %253Ctraceback object at 0x1017de560%26gt%3B%2529" isContainer="True" />%0A<var name="lock" type="NoneType" value="NoneType%253A None" />%0A<var name="name" type="str" value="str%253A radio" />%0A</xml>

received >>113    9    pid58545_seq1    4299298496    FRAME    trunk.coordinate    1
('received command ', '113\t9\tpid58545_seq1\t4299298496\tFRAME\ttrunk.coordinate\t1')
command >>113    9    pid58545_seq1    4299298496    FRAME    trunk.coordinate    1<<
('processing internal command ', '<pydevd_comm.InternalEvaluateExpression object at 0x1017cacd0>')
sending cmd: CMD_EVALUATE_EXPRESSION 113    9    <xml><var name="" type="NameError" value="NameError%253A name %2527trunk%2527 is not defined" isErrorOnEval="True" />%0A</xml>

received >>113    11    pid58545_seq1    4299298496    FRAME    trunk.coordinate    1
('received command ', '113\t11\tpid58545_seq1\t4299298496\tFRAME\ttrunk.coordinate\t1')
command >>113    11    pid58545_seq1    4299298496    FRAME    trunk.coordinate    1<<
('processing internal command ', '<pydevd_comm.InternalEvaluateExpression object at 0x1017d7150>')
sending cmd: CMD_EVALUATE_EXPRESSION 113    11    <xml><var name="" type="NameError" value="NameError%253A name %2527trunk%2527 is not defined" isErrorOnEval="True" />%0A</xml>
Comment actions Permalink
I have also ran into similar problem.
Debug within Pycharm was working just fine one minute, now broken...

Received command: CMD_RUN 101    21    

sending cmd –>    CMD_THREAD_CREATE 103    2    <xml><thread name="pydevd.reader" id="-1"/></xml>
sending cmd –>    CMD_THREAD_CREATE 103    4    <xml><thread name="pydevd.writer" id="-1"/></xml>
Traceback (most recent call last):
  File "/Applications/", line 1733, in <module>['file'], None, None)
  File "/Applications/", line 1226, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/Applications/", line 27, in execfile
NameError: name 'streamw' is not defined
Handling post-mortem stop on exception breakpoint BaseException
We are stopping in post-mortem

sending cmd –>    CMD_THREAD_CREATE 103    6    <xml><thread name="MainThread" id="pid514_seq1" /></xml>
sending cmd –>   CMD_THREAD_SUSPEND 105    8    <xml><thread id="pid514_seq1" stop_reason="122" message="BaseException"><frame id="5802300" name="execfile" file="/Applications/" line="27">"</frame><frame id="5322828" name="run" file="/Applications/" line="1226">"</frame><frame id="11032076" name="&lt;module&gt;" file="/Applications/" line="1733">"</frame></thread></xml>
received >>114    23    pid514_seq1    5802300    FRAME

Received command: CMD_GET_FRAME 114    23    pid514_seq1    5802300    FRAME

('processing internal command ', '<pydevd_comm.InternalGetFrame object at 0x1b5746c>')
sending cmd –>        CMD_GET_FRAME 114    23    <xml><var name="__exception__" type="tuple" value="tuple: (<class 'NameError'&gt;, NameError("name 'streamw' is not defined",), None)" isContainer="True" /> <var name="_i" type="int" value="int: 1" /> <var name="encoding" type="NoneType" value="NoneType: None" /> <var name="file" type="str" value="str: /Users/david.hwu/smartshoot/eng/swap/src/common/utility/" /> <var name="glob" type="dict" value="dict: {'__loader__': <_frozen_importlib.SourceFileLoader object at 0x47e90c&gt;, '__package__': None, '__file__': '/Users/david.hwu/smartshoot/eng/swap/src/common/utility/', '__name__': '__main__', '__doc__': None, '__spec__': None, '__builtins__': <module 'builtins' (built-in)&gt;}" isContainer="True" /> <var name="line" type="bytes" value="bytes: b'"""\n'" isContainer="True" /> <var name="loc" type="dict" value="dict: {'__loader__': <_frozen_importlib.SourceFileLoader object at 0x47e90c&gt;, '__package__': None, '__file__': '/Users/david.hwu/smartshoot/eng/swap/src/common/utility/', '__name__': '__main__', '__doc__': None, '__spec__': None, '__builtins__': <module 'builtins' (built-in)&gt;}" isContainer="True" /> <var name="stream" type="BufferedReader" value="BufferedReader: <_io.BufferedReader name='/Users/david.hwu/smartshoot/eng/swap/src/common/utility/'&gt;" isContainer="True" /> </xml>

Please sign in to leave a comment.