Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepping into a @generated function causes an exception to be thrown. #2441

Open
mrakgr opened this issue Sep 7, 2021 · 1 comment
Open

Comments

@mrakgr
Copy link

mrakgr commented Sep 7, 2021

Repost of the Debugger.jl issue.


@generated function fgen(x::Int)
    :(x+1)
end

fgen(1)
Exception has occurred: ErrorException
Method is @generated; try `code_lowered` instead.

I am trying to step into fgen(1) in VS Code and having the exception thrown, though setting a breakpoint to skip past the troublesome area works fine.

Is stepping into @generated functions not supported or is this maybe a VS Code specific issue? I am using the Julia debugger to go over a library and keep running into this.

Specs: Julia 1.6.2, julialang.language-julia v1.3.34, Windows 10.

@davidanthoff davidanthoff added this to the Backlog milestone Sep 10, 2021
@davidanthoff davidanthoff removed this from the Backlog milestone Oct 15, 2022
thautwarm pushed a commit to Suzhou-Tongyuan/ObjectOriented.jl that referenced this issue Jan 10, 2023
thautwarm pushed a commit to Suzhou-Tongyuan/ObjectOriented.jl that referenced this issue Jan 10, 2023
thautwarm added a commit to Suzhou-Tongyuan/ObjectOriented.jl that referenced this issue Jan 10, 2023
@JamieMair
Copy link

Now in 1.8+, trying to debug any code with a generated function somewhere in the call stack causes the REPL to crash with VS code, not just throw an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants