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

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

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

and the file main.jl

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

    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

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.

1 Like

Thanks for fixing this so fast!
rd

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

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.