julia-snail icon indicating copy to clipboard operation
julia-snail copied to clipboard

debug: Indefinitely stuck in `dape:starting`

Open RomeoV opened this issue 11 months ago • 4 comments

Thanks for adding the new DebugAdapter.jl integration with dape. Unfortunately, I can't get it to work -- the dape UI windows open, but then I am indefinitely stuck at status dape:starting. I have already set the dape-request-timeout to 120 seconds, because sometimes Julia needs to still compile something. However, it doesn't seem to help.

Has anybody had any luck using the new extension?

This is on emacs 30, with julia 1.10, and

# dape version
      Build: HEAD -> master, origin/master, origin/HEAD 60d817f 2025-01-10 00:08:44 +0000
# julia-snail version
      Build: HEAD -> master, origin/master, origin/HEAD 24f79a0 2024-12-16 12:18:25 -0800

Could the problem be related to the json parser changes in emacs 30?

RomeoV avatar Jan 13 '25 16:01 RomeoV

I don't know, sorry. I don't use dape (yet...). @iNecas, any ideas?

gcv avatar Jan 13 '25 18:01 gcv

There are still some changes to make it working end2end, I first was working with the changes in the DebugAdapter https://github.com/julia-vscode/DebugAdapter.jl/pull/95. During the review, it seems like it's better place to make the corresponding changes in he dape itself (there are some incompatibilities when it comes to passing null values).

So short time solution would be to use local DebugAdapter with the patches applied. The proper solution would be to make corresponding changes in dape, but unfortunately I don't have capacity now to work on those.

iNecas avatar Jan 14 '25 08:01 iNecas

I can verifify that this works with the DebugAdapter.jl fork from the PR. One option to consider is using the Julia 1.11 [sources] feature, and specifying the fork in the Project.toml file. That would allow users to use this feature without further fuss, provided they initially use Julia 1.11 to resolve the dependencies.

It can however lead to an annoying bug. If the first time the extension is loaded is with Julia < 1.11, then the wrongly resolved Manifest.toml needs to be deleted manually later.

For reference, the new Project.toml would look like this:

# ~/.e/.l/s/r/j/e/debug (master)> cat Project.toml 
[deps]
DebugAdapter = "17994d07-08fe-42cc-bc1b-7af499b1ea47"

[sources]
DebugAdapter = {url = "https://github.com/iNecas/DebugAdapter.jl", rev="dape-compatibility"}

RomeoV avatar Jan 14 '25 14:01 RomeoV

Another possibility is to monkey-patch DebugAdapter from the extension itself. (i.e. check the installed version of DebugAdapter, and if it’s affected, dynamically replace the affected code.)

gcv avatar Jan 14 '25 22:01 gcv