# VS Code Debugger include("bar.jl") "paused on exception"

**URL:** <https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779>\
**Category:** VS Code\
**Created:** [July 9, 2020, 11:02am UTC](https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779 "2020-07-09T11:02:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdjconti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdjconti/32/16264_2.png) [@rdjconti](https://discourse.julialang.org/u/rdjconti)\
**Post date:** [July 9, 2020, 11:02am UTC](https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779/1 "2020-07-09T11:02:04Z")

</div>

Hello,  
I try to debug the example from julia discourse `foo()` calls `bar()` but with `bar()` in a separate file `bar.jl`

```julia
function bar(a, b)
    c = a + b;
    d = a * b; 
    return c + d
end

```

and the file `main.jl`

```julia
include("bar.jl")
function foo()
    println("STEP 1")
    println("STEP 2")
    x = bar(3, 6);
    y = x * 3;
    println("STEP 3: ", y)
    println("STEP 4")
end
foo()

```

Both files are in the same folder.  
When I press `Run and Debug`, `main.jl` opened, the debugger gets `PAUSED ON EXCEPTION` in the file  
`julia-1.4.2/share/julia/base/client.jl` and I cannot Continue debugging.  
The line in `client.jl` is

```julia
    try
        result = ccall(:jl_load_, Any, (Any, Any), mod, path)
    finally
        if prev === nothing
            Base.delete!(tls, :SOURCE_PATH)
        else
            tls[:SOURCE_PATH] = prev <======= line 444: PAUSED ON EXCEPTION
        end
    end
    return result

```

Running the code in `main.jl` with CTRL-F5 (Run Without Debugging) works fine.

Any hints what I’m doing wrong? Do I have to set a PATH variable?

Thanks  
rd

---

<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:** [July 10, 2020, 7:15pm UTC](https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779/2 "2020-07-10T19:15:00Z")

</div>

It is a bug, thanks for reporting! I think we will be able to push out a fix very soon: [https://github.com/julia-vscode/DebugAdapter.jl/pull/12](https://github.com/julia-vscode/DebugAdapter.jl/pull/12).

---

<div class="post-metadata">

**Author:** ![rdjconti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdjconti/32/16264_2.png) [@rdjconti](https://discourse.julialang.org/u/rdjconti)\
**Post date:** [July 13, 2020, 10:06am UTC](https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779/3 "2020-07-13T10:06:46Z")

</div>

Thanks for fixing this so fast!  
rd

---

<div class="post-metadata">

**Author:** ![jarecsni](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jarecsni/32/16205_2.png) [@jarecsni](https://discourse.julialang.org/u/jarecsni)\
**Post date:** [August 25, 2020, 8:55pm UTC](https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779/4 "2020-08-25T20:55:20Z")

</div>

Hi,

I am still having this issue (debugger stops on exception at exact same line).

I have Julia Language Support plugin 1.0.4, VSC 1.48.2

Has the fix not yet been shipped maybe?

Thanks,  
Janos

---

<div class="post-metadata">

**Author:** ![rdjconti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdjconti/32/16264_2.png) [@rdjconti](https://discourse.julialang.org/u/rdjconti)\
**Post date:** [August 29, 2020, 4:00pm UTC](https://discourse.julialang.org/t/vs-code-debugger-include-bar-jl-paused-on-exception/42779/5 "2020-08-29T16:00:14Z")

</div>

Hello,

I have the same configuration as you, VSC 1.48.2 and plugin 1.0.4 (on Windows 10) but for me it works. I’m on julia 1.5.1 but it worked for me also under 1.4.2. It took a few days (2-3 days) until the fix got delivered to me by an update of the Julia plugin. But since July 13 I didn’t had any problems anymore.
