[DAP+Python] Enable debugging with Python in Helix #12722
Unanswered
nicholasjng
asked this question in
Troubleshooting
Replies: 3 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
8 replies
-
Reproduction steps with the above script Python script as Either with python3 itself or uv (which I use for simplicity):
The key sequence:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
In the current (master) Is it possible to setup some log so that one can see the output of print("something") |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm opening this discussion to summarize the current state of Helix debugging with Python.
What is the situation?
Using Helix's DAP implementation to debug Python scripts with a DAP client (most notably debugpy) does not quite work. But it's getting there! At HEAD, I can set breakpoints, launch templates, and inspect variables, say on this example file:
using the following configuration:
That results in a view such as the following:
Nice!
What are the issues?
Although there were other threads opened previously, my first issue thread (#11777) contains a crash story coming from a nonstandard event ("debugpySockets") emitted by sufficiently new versions of debugpy, that caused the Helix DAP transport to crash. This has been fixed in fec5101, and currently, we can hit breakpoints and list variables as shown above.
The remaining issues are
(1) Helix is backgrounded (backgrounding itself?) on the encounter of a breakpoint - this can be fixed with
fg
in zsh, and(2) After re-foregrounding, keyboard inputs are written into the terminal window, which causes loss of control over the window, and the window filling up with the escaped contents of the user's inputs. Helix then has to be killed, to avoid writing the garbage-filled buffer to the opened file.
What is the solution?
I'm not well versed in Helix internals, and unsure what the reasons could be for the backgrounding and the buffer weirdness, but I'd like to offer my help to improve the current state. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions