Vscode crash on debug with "unknown command" on 1.11.2

Hello.

I am on vscode 1.96.2 w/ julia ext 1.127.2 – but the exact same thing happens prerelease 1.136.1.

The simplest code simply crashes the debugger – and I don’t even need to create breakpoints for this to happen.

E.g. this relatively harmless one liner:

println("adsf")

On pressing F5 I get the following:

Activating project at `~/Work/conspnet`
┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/error_handler.jl:15
ERROR: Unknown command
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] run(debug_session::VSCodeDebugger.DebugAdapter.DebugSession, error_handler::VSCodeDebugger.var"#3#4"{String})
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/DebugAdapter/src/packagedef.jl:168
 [3] startdebugger()
   @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/packages/VSCodeDebugger/src/VSCodeDebugger.jl:45
 [4] top-level scope
   @ ~/.vscode/extensions/julialang.language-julia-1.127.2/scripts/debugger/run_debugger.jl:12
 [5] include(mod::Module, _path::String)
   @ Base ./Base.jl:557
 [6] exec_options(opts::Base.JLOptions)
   @ Base ./client.jl:323
 [7] _start()
   @ Base ./client.jl:531

Any help much apprecieated!
D

Can you try again with v1.138 prerelease? I think I might have fixed it, or at least added diagnostic code that should tell us a bit more what is going wrong.

That’s funny, w/ 1.138.1, all I get is:

  Activating project at `~/Work/conspnet`
 *  Terminal will be reused by tasks, press any key to close it. 

That’s it.

Could it be an interaction with other extensions? Or some setting I have added in settings.json? I don’t know how to debug this.

Wait a minute. I created a new directory, copied the same old println("asdf") script in there and opened it in vscode. The debugger worked as it should. Now I am even more perplexed…

I am fairly sure that what is happening is that for some reason the debugger can’t read/open the file you are trying to run. In the previous version that lead to a crash, now it just terminates. Really it should output an error message, but I haven’t found a good way to do that…

Could you check what your debug configuration is?

No need to.
It must have been something really wicked I had done in the local .vscode/settings.json, although I don’t know what.
I deleted the whole file and now everything works w/ the prerelease version.

Thanks for the immediate answer, and I’m sorry for the false alarm.

D

1 Like