Debugger hangs on breakpoint when running with python console
I run the debugger with "Run with Pyrhon Console" on a simple script which defines one function called myfunc(). The script runs as expected and I get the debugger console prompt. If I call myfunc() from the debug console prompt, the debugger hangs on the line where the breakpoint should have occurred. If I then press the red square to stop the program, I get the following traceback:
Traceback (most recent call last):
File "/snap/pycharm-professional/240/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "/home/sivan/Dropbox/Research/msft/fairness/Code/python/temp.py", line 4, in myfunc
print(a)
File "/home/sivan/Dropbox/Research/msft/fairness/Code/python/temp.py", line 4, in myfunc
print(a)
File "_pydevd_bundle/pydevd_cython.pyx", line 1589, in _pydevd_bundle.pydevd_cython.ThreadTracer.__call__
File "_pydevd_bundle/pydevd_cython.pyx", line 929, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 920, in _pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch
File "_pydevd_bundle/pydevd_cython.pyx", line 317, in _pydevd_bundle.pydevd_cython.PyDBFrame.do_wait_suspend
File "/snap/pycharm-professional/240/plugins/python/helpers/pydev/pydevd.py", line 1111, in do_wait_suspend
self.process_internal_commands()
File "/snap/pycharm-professional/240/plugins/python/helpers/pydev/pydevd.py", line 786, in process_internal_commands
with self._main_lock:
File "/snap/pycharm-professional/240/plugins/python/helpers/pydev/pydevd.py", line 220, in __enter__
self.acquire()
File "/snap/pycharm-professional/240/plugins/python/helpers/pydev/pydevd.py", line 212, in acquire
self._lock.acquire()
KeyboardInterrupt
If I call myfunc() again after that, it just runs straight through without stopping at the breakpoint.
I am using Ubungu 20.04, PyCharm details are below:
PyCharm 2021.1 (Professional Edition)
Build #PY-211.6693.115, built on April 6, 2021
Runtime version: 11.0.10+9-b1341.35 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Linux 5.8.0-48-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Please sign in to leave a comment.