PyCharm won't break on exception
This has been getting more and more frequent, and now is continual. I have Exception breakpoints enabled on all exceptions, with "Suspend" checked. Line-number breakpoints work, but exceptions (index out of range, divide by zero) don't. This is making PyCharm pretty useless as a debug tool.
Happens even for trivially small scripts, e.g.
foo = [1,2,3,4]
print(foo[0])
print(foo[5])
results in this:
C:\Users\19529\AppData\Local\Continuum\Anaconda3\python.exe "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd.py" –multiproc –client 127.0.0.1 –port 53229 –file E:/Python/SubdriveOpt/Scratchpad.py
pydev debugger: process 10284 is connecting
Connected to pydev debugger (build 139.1547)
1
Traceback (most recent call last):
File "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd.py", line 2217, in <module>
globals = debugger.run(setup['file'], None, None)
File "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd.py", line 1643, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/Python/SubdriveOpt/Scratchpad.py", line 4, in <module>
print(foo[5])
IndexError: list index out of range
Process finished with exit code 1
Any ideas would be much appreciated.
Happens even for trivially small scripts, e.g.
foo = [1,2,3,4]
print(foo[0])
print(foo[5])
results in this:
C:\Users\19529\AppData\Local\Continuum\Anaconda3\python.exe "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd.py" –multiproc –client 127.0.0.1 –port 53229 –file E:/Python/SubdriveOpt/Scratchpad.py
pydev debugger: process 10284 is connecting
Connected to pydev debugger (build 139.1547)
1
Traceback (most recent call last):
File "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd.py", line 2217, in <module>
globals = debugger.run(setup['file'], None, None)
File "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\pydevd.py", line 1643, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\19529\AppData\Roaming\JetBrains\PyCharm 4.0.5\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:/Python/SubdriveOpt/Scratchpad.py", line 4, in <module>
print(foo[5])
IndexError: list index out of range
Process finished with exit code 1
Any ideas would be much appreciated.
请先登录再写评论。