reloadium
reloadium copied to clipboard
Error attaching trying to attach a debugger
Maybe I'm getting too much ahead but since Pycharm is the only supported IDE atm I was trying to check if it's possible to use reloadium
with some other debugger attached - simple pdb
or debugpy
.
Since I currently testing it with reloadium run
is blocked by #197 for me I was starting it from Pycharm plugin assuming it works similarly to how reloadium run
should.
Steps:
- Save either one of the examples below
- Run with Reloadium from Pycharm
- Get Nuitka related traceback.
Is it known limitation or it's a bug?
Could it be fixed? That way it will be possible to make reloadium
IDE independent - it would be possible to use it with just pdb
.
example1.py
breakpoint()
# Traceback (most recent call last):
# File "Python311\Lib\pdb.py", line 1696, in set_trace
# pdb.set_trace(sys._getframe().f_back)
# File "Python311\Lib\bdb.py", line 332, in set_trace
# frame.f_trace = self.trace_dispatch
# ^^^^^^^^^^^^^
# RuntimeError: f_trace is not writable in Nuitka
example2.py
import debugpy
debugpy.listen(5678)
debugpy.wait_for_client()
# Traceback (most recent call last):
# File "\main.py", line 3, in <module>
# debugpy.listen(5678)
# File "\debugpy\public_api.py", line 31, in wrapper
# return wrapped(*args, **kwargs)
# ^^^^^^^^^^^^^^^^^^^^^^^^
# File "\debugpy\server\api.py", line 45, in _settrace
# return pydevd.settrace(*args, **kwargs)
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# RuntimeError: f_trace is not writable in Nuitka
Desktop or remote (please complete the following information):
- OS: Windows 11 23H2
- OS version: 23H2
- M1 chip: no
- PyCharm plugin version: 1.5.1
- Editor: PyCharm
- Python: Python 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
- Run mode: Run