julia-vscode
julia-vscode copied to clipboard
Debugger crash after stepping through `@generated`
Stepping through this call crashes the debugger ~and it remains crashed after julia is restarted, one has to restart vscode to recover.~ Scratch that, I just tested again and this time it worked to just restart the julia process
@generated function foo(x)
x
end
bar(x) = foo(x)
julia> @enter bar(1)
Error while running the debugger (consider adding a breakpoint for uncaught exceptions):
ERROR: Method is @generated; try `code_lowered` instead.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] uncompressed_ir(m::Method)
@ Base ./reflection.jl:1037
[3] get_source
@ ~/.vscode/extensions/julialang.language-julia-1.6.11/scripts/packages/JuliaInterpreter/src/construct.jl:89 [inlined]
[4] compute_corrected_linerange
@ ~/.vscode/extensions/julialang.language-julia-1.6.11/scripts/packages/JuliaInterpreter/src/utils.jl:376 [inlined]
[5] scopes_request(conn::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, state::VSCodeServer.DebugAdapter.DebuggerState, params::VSCodeServer.DebugAdapter.ScopesArguments)
@ VSCodeServer.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.6.11/scripts/packages/DebugAdapter/src/debugger_requests.jl:526
[6] (::VSCodeServer.DebugAdapter.var"#127#153"{VSCodeServer.DebugAdapter.DebuggerState})(conn::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::VSCodeServer.DebugAdapter.ScopesArguments)
@ VSCodeServer.DebugAdapter ~/.vscode/extensions/julialang.language-julia-1.6.11/scripts/packages/DebugAdapter/src/packagedef.jl:56
[7] dispatch_msg(x::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::VSCodeServer.JSONRPC.MsgDispatcher, msg::Dict{String, Any})
@ VSCodeServer.JSONRPC ~/.vscode/extensions/julialang.language-julia-1.6.11/scripts/packages/JSONRPC/src/typed.jl:67
[8] macro expansion
@ ~/.vscode/extensions/julialang.language-julia-1.6.11/scripts/packages/DebugAdapter/src/packagedef.jl:76 [inlined]
[9] (::VSCodeServer.DebugAdapter.var"#144#170"{VSCodeServer.var"#147#149", VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, VSCodeServer.JSONRPC.MsgDispatcher})()
@ VSCodeServer.DebugAdapter ./task.jl:423
I am also running into this same error message when using the vscode debugger. When I set a breakpoint in a function, and that function contains a call to Zygote.gradient()
, then the debugger will fail. Just wanted to suggest that this problem is happening in other contexts too. Thanks.
Just wanted to upvote and mention that I also run into this error after disabling Uncaught Exceptions
.