helix icon indicating copy to clipboard operation
helix copied to clipboard

python dap

Open lanlanlan3 opened this issue 2 years ago • 6 comments

hx --checkhealth python Configured debug adapter: None

lanlanlan3 avatar Dec 09 '22 01:12 lanlanlan3

Not a maintainer, but I think more details on your issue would be helpful for anyone looking to assist!

weakphish avatar Dec 12 '22 20:12 weakphish

Interested about that too. Are there either no available DAP or I have to install some stuff for python?

ushankax avatar Dec 15 '22 16:12 ushankax

There appears to be a DAP for Python, but I'm not sure if it's been integrated into Helix. What kind of work would that take?

weakphish avatar Dec 15 '22 17:12 weakphish

debugpy in the author's todo list, i saw somewhere

yuexl avatar Dec 16 '22 18:12 yuexl

I think I'm halfway there but it's not quite working... With this language config:

[[language]]
name = "python"

[language.debugger]
name = "debugpy"
transport = "stdio"
command = "python"
args = ["-m",  "debugpy.adapter"]

[[language.debugger.templates]]
name = "source"
request = "launch"
completion = [ { name = "entrypoint", completion = "filename", default = "." } ]
args = { mode = "debug", program = "{0}" }

The debugger starts and it halts program execution on the first breakpoint I set. But then it puts hx in the backgrounds and just messes up the terminal :sweat_smile: hahaha. If anyone has an idea what I'm doing wrong I'm all ears. Would love to get this working.

RmStorm avatar Jan 05 '23 11:01 RmStorm

Same here the problem with DAP, i don't how to do it for python

image

It was farily easy to install pylsp with this wiki https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers#pylsp, i hope that is also possible for DAP

Martin15135215 avatar Jan 14 '23 17:01 Martin15135215

Hi @RmStorm, did you have any more success in setting up the Python DAP in Helix?

rkshthrmsh avatar Mar 03 '23 09:03 rkshthrmsh

It appears that Helix is, at the moment, unable to parse debugpy's output properly. Have opened an issue for this here: #6265. There's a TODO for this already.

rkshthrmsh avatar Mar 14 '23 04:03 rkshthrmsh