# VS Code debugger crashes for "Hello World"

**URL:** <https://discourse.julialang.org/t/vs-code-debugger-crashes-for-hello-world/124078>\
**Category:** VS Code\
**Tags:** debug, debugging, debugger\
**Created:** [December 21, 2024, 9:17pm UTC](https://discourse.julialang.org/t/vs-code-debugger-crashes-for-hello-world/124078 "2024-12-21T21:17:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcaetano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcaetano/32/214330_2.png) [@mcaetano](https://discourse.julialang.org/u/mcaetano)\
**Post date:** [December 21, 2024, 9:17pm UTC](https://discourse.julialang.org/t/vs-code-debugger-crashes-for-hello-world/124078/1 "2024-12-21T21:17:47Z")

</div>

Hello,  
I understand that the Julia debugging experience in VS Code is still under development, but I was never able to get the debugger to work even for the “Hello World” script set as the example on VS Code’s page. When I follow the example [here](https://code.visualstudio.com/docs/languages/julia#_debugging), I create the file

```julia
print("Hello!")

```

and hit `F5` _without setting a breakpoint_, the result is

```julia
Activating project at `~/.julia/environments/v1.11`
Hello!┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/error_handler.jl:15
ERROR: type Nothing has no field frame
Stacktrace:
  * Terminal will be reused by tasks, press any key to close it.

```

If I set a breakpoint in the only line of code and hit `F5`, the result is

```julia
Activating project at `~/.julia/environments/v1.11`
┌ Error: Some Julia code in the VS Code extension crashed
└ @ VSCodeDebugger ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/error_handler.jl:15
ERROR: TypeError: non-boolean (Missing) used in boolean context
Stacktrace:
 [1] evaluate_request(debug_session::VSCodeDebugger.DebugAdapter.DebugSession, params::VSCodeDebugger.DebugAdapter.EvaluateArguments)
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/debugger_requests.jl:923
 [2] (::VSCodeDebugger.DebugAdapter.var"#119#148"{VSCodeDebugger.DebugAdapter.DebugSession})(params::VSCodeDebugger.DebugAdapter.EvaluateArguments)
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/packagedef.jl:82
 [3] dispatch_msg(x::VSCodeDebugger.DebugAdapter.DAPRPC.DAPEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeDebugger.DebugAdapter.DAPRPC.MsgDispatcher, msg::Dict{String, Any})
   @ VSCodeDebugger.DebugAdapter.DAPRPC ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/DAPRPC/typed.jl:89
 [4] (::VSCodeDebugger.DebugAdapter.var"#132#161"{Dict{String, Any}, VSCodeDebugger.var"#3#4"{String}, VSCodeDebugger.DebugAdapter.DAPRPC.MsgDispatcher, VSCodeDebugger.DebugAdapter.DAPRPC.DAPEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}})()
   @ VSCodeDebugger.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.129.1/scripts/packages/DebugAdapter/src/packagedef.jl:98

 * The terminal process "julia '--color=yes', '--startup-file=no', '--history-file=no', '/Users/caetano/.vscode/extensions/julialang.language-julia-1.129.1/scripts/debugger/run_debugger.jl', '/var/folders/xl/g_zr4nmn7hs7j9r988d9_fj80000gn/T/vsc-jl-dbg-a82cfb2e-a940-48eb-9c2f-52fe34c5f13c', '/var/folders/xl/g_zr4nmn7hs7j9r988d9_fj80000gn/T/vsc-jl-dbg-d0b95e9c-3876-4b99-a727-36bf02264bfb', '/var/folders/xl/g_zr4nmn7hs7j9r988d9_fj80000gn/T/vsc-jl-cr-165b3af1-009d-4724-9f63-bf419dd458b7'" terminated with exit code: 1. 
 * Terminal will be reused by tasks, press any key to close it. 

```

This has always been the behavior since the first time I tried the Julia debugger in VS Code. I created an [issue on GitHub](https://github.com/julia-vscode/julia-vscode/issues/3308) a couple of years ago but never got a reply (it’s still open). I’m on MacOS Sonoma (14.7.2 (23H311)) using the latest version of VS Code (see below), Julia version `1.11.2`, and this example was made with the pre-release of `julialang.language-julia` Version `1.129.1` Last Updated 2024-12-21, 08:54:29. However, note that the behavior is the same with the current release version `1.127.2`.

> Version: 1.96.2 (Universal)  
> Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f  
> Date: 2024-12-19T10:22:47.216Z  
> Electron: 32.2.6  
> ElectronBuildId: 10629634  
> Chromium: 128.0.6613.186  
> Node.js: 20.18.1  
> V8: 12.8.374.38-electron.0  
> OS: Darwin arm64 23.6.0

I’ll happily provide more information if it helps solve the issue.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [December 21, 2024, 11:59pm UTC](https://discourse.julialang.org/t/vs-code-debugger-crashes-for-hello-world/124078/2 "2024-12-21T23:59:11Z")

</div>

Let’s continue the conversation over at [Debugger crashes when debugger is launched · Issue #3308 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/3308), I’m about to follow up there with some requests for more help.

---

<div class="post-metadata">

**Author:** ![mcaetano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcaetano/32/214330_2.png) [@mcaetano](https://discourse.julialang.org/u/mcaetano)\
**Post date:** [December 22, 2024, 12:57am UTC](https://discourse.julialang.org/t/vs-code-debugger-crashes-for-hello-world/124078/3 "2024-12-22T00:57:35Z")

</div>

After looking into the issue over on GitHub, David found the origin of the error:

> Ok, I think what is happening here is that the Ruby debug adapter is incorrectly sending an evaluate request to the Julia debug session. Could you try if this error still occurs if you simply disable that extension?

I disabled the extension [VSCode rdbg Ruby Debugger](https://marketplace.visualstudio.com/items?itemName=KoichiSasada.vscode-rdbg) and now the error is gone. Thank you very much, David. Much appreciated 🙂
