# VSCode Debugger bugs (are these known issues?)

**URL:** https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790
**Category:** Tooling
**Tags:** debug, debugging, debugger
**Created:** [September 24, 2024, 6:17am UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790 "2024-09-24T06:17:44Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Arlo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arlo/32/211461_2.png) [@Arlo](https://discourse.julialang.org/u/Arlo)
#### Post date: [September 24, 2024, 6:17am UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/1 "2024-09-24T06:17:44Z")

</div>

I’ve been trying out the Julia debugger in VSCode and found a few issues with it.  
_Windows 11, VSCode 1.93.1, julia-vscode v1.123.2_

Are these all known issues? If not, where should I report them, the VScode plugin project, or Debugger?

**REPL Mode**  
within REPL, `@run` only works once per session; otherwise it hangs and never hits the breakpoint.

**Run & Debug Mode**  
Can’t change breakpoints while paused. Also, this breaks the ‘Run to Cursor’ feature.

Julia: Compiled Code mode worked initially, but stopped working as soon as I changed it. ‘Apply default’ appears to work, but did not restore functionality.

Debugger stopped working at one point and I needed to restart VSCode. Not sure how to repro this one, but I’ll try to identify repro steps.

---

<div class="post-metadata">

### Author: ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)
#### Post date: [September 24, 2024, 8:51am UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/2 "2024-09-24T08:51:16Z")

</div>

What version of Julia? What is in your global Project.toml file? Do you have a piece code that can replicate this behavior in a fresh directory?

You can open issues on the Julia VSCode extension GitHub, but I think you’re more likely to get help here.

---

<div class="post-metadata">

### Author: ![Arlo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arlo/32/211461_2.png) [@Arlo](https://discourse.julialang.org/u/Arlo)
#### Post date: [September 26, 2024, 12:28am UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/3 "2024-09-26T00:28:29Z")

</div>

Julia 1.10.5

This is in a new project, only added `Revise`, `Infiltrator`

Another person encountered the only can `@run` once per session bug:

> [@Debug only running once in VSCode](https://discourse.julialang.org/t/debug-only-running-once-in-vscode/119881):
>
> When I use @run at the VSCode Julia REPL to start a debug session it works fine the first time it is called. But every subsequent time it just spins and the debug session never gets started. I have to kill the REPL and make a new terminal to get it to start again. This started happening a while ago. How can I fix it? If I ctrl-C the @run I get this stack trace: julia\> @run make\_function([f],[d]) ^C ERROR: InterruptException: Stacktrace: [1] try\_yieldto(undo::typeof(Base.ensure\_rescheduled)) …

---

<div class="post-metadata">

### Author: ![mrufsvold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mrufsvold/32/31600_2.png) [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)
#### Post date: [September 26, 2024, 12:30am UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/4 "2024-09-26T00:30:02Z")

</div>

I’ll try to give it a go tomorrow and see if I can figure anything out!

---

<div class="post-metadata">

### Author: ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)
#### Post date: [September 26, 2024, 3:40pm UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/5 "2024-09-26T15:40:39Z")

</div>

For me this happens in every project. I’ve got about 5 I regularly mess with all with very different dependencies. Here’s my startup.jl file, if that is helpful:

```julia
using Pkg

let
    pkgs = ["BenchmarkTools", "OhMyREPL", "Revise", "Crayons"]
    for pkg in pkgs
        if Base.find_package(pkg) === nothing
            Pkg.add(pkg)
        end
    end
end

using BenchmarkTools
using OhMyREPL
using Crayons
import OhMyREPL: Passes.SyntaxHighlighter

try
    using Revise
catch e
    @warn "Error initializing Revise" exception = (e, catch_backtrace())
end

function vscode_color_scheme()
    scheme = SyntaxHighlighter.ColorScheme()

    # colors to match VSCode dark color scheme
    SyntaxHighlighter.string!(scheme, crayon"ce9178")
    SyntaxHighlighter.comment!(scheme, crayon"6A9955")
    SyntaxHighlighter.function_def!(scheme, crayon"DCDCAA")
    SyntaxHighlighter.call!(scheme, crayon"DCDCAA")
    SyntaxHighlighter.macro!(scheme, crayon"DCDCAA")
    SyntaxHighlighter.error!(scheme, crayon"F44747")
    SyntaxHighlighter.number!(scheme, crayon"B5CEA8")
    SyntaxHighlighter.op!(scheme, crayon"d4d4d4")
    SyntaxHighlighter.keyword!(scheme, crayon"569cd6")
    SyntaxHighlighter.symbol!(scheme, crayon"4EC9B0")
    SyntaxHighlighter.argdef!(scheme, crayon"4EC9B0")

    return scheme
end

SyntaxHighlighter.add!("VSCode", vscode_color_scheme())
colorscheme!("VSCode")

ENV["JULIA_EDITOR"] = "code.cmd"

```

I also created a new empty project with just one file and no dependencies. Here’s the contents of the file:

```julia
module Garb

greet() = print("Hello World!")
export greet

end # module Garb

```

and here are the dependencies:

```julia
(Garb) pkg> st
Project Garb v0.1.0
Status `C:\Users\seatt\OneDrive\Documents\temp\Garb\Project.toml` (empty project)

```

Here’s the result of doing `@run greet()` twice:

```julia
julia> using Garb

julia> @run greet()
Hello World!
julia> @run greet() #debugger goes into infinite wait loop here

```

---

<div class="post-metadata">

### Author: ![RangeFu](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@RangeFu](https://discourse.julialang.org/u/RangeFu)
#### Post date: [October 5, 2024, 3:59pm UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/6 "2024-10-05T15:59:51Z")

</div>

Report having the same issue

---

<div class="post-metadata">

### Author: ![Arved](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arved/32/209192_2.png) [@Arved](https://discourse.julialang.org/u/Arved)
#### Post date: [October 17, 2024, 7:01pm UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/7 "2024-10-17T19:01:53Z")

</div>

I have the same issue.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [October 17, 2024, 9:03pm UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/8 "2024-10-17T21:03:42Z")

</div>

Yes, unfortunately a recurrent issue. But it’s probably not a direct fault of the Julia extension. At least things did not change when I went back to versions that I know were working before.

---

<div class="post-metadata">

### Author: ![Arved](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arved/32/209192_2.png) [@Arved](https://discourse.julialang.org/u/Arved)
#### Post date: [October 18, 2024, 7:54am UTC](https://discourse.julialang.org/t/vscode-debugger-bugs-are-these-known-issues/119790/9 "2024-10-18T07:54:55Z")

</div>

Could this issue be caused by recent updates to Visual Studio Code? It’s not isolated to Windows, so it might be a more general problem: [Debugger runs fine once. When I use it again, it seems to be stuck in a loop · Issue #3688 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/3688)
