When using Debugger.jl from the REPL, I often find I have a function call like
@views foo!(a[:,j,i], b[j], c.bar)
To actually step into the body of foo!()
, I find myself first stepping into getindex()
/getproperty()
/etc. then stepping out, and repeating for several arguments to foo!()
, before I finally get into the body of foo!()
.
Is there any way to jump straight into the body of foo!()
? Apologies if I’ve missed in in the help or Debugger.jl docs! One possibility I guess is to add a breakpoint like bp add foo!(x,y,z)
, but that gets tedious for functions with long signatures, and I don’t necessarily want the breakpoint, so would probably have to delete it immediately after jumping to it.
In vscode, you can right-click the code and press “step into targets” and choose where to step in the popyup menu that appears. I’m not sure if anything similar works in the terminal.
You can use se
instead of s
to avoid stepping into all those functions. Just make sure to remember to use s
once you get to the function call of interest.
2 Likes
Thanks @StevenWhitaker, that does help. I still find it pretty easy to miss the function call. It would be nice to have a single command, but I guess that’s a feature request for Debugger.jl!
It would be quite easy to add a command that steps into the last function for a given line (which should be the outermost).
3 Likes
Also, it is better to use nc
here, to avoid having to step over so much garbage.
I hope that this will become the default when debugging in VSCode. Current one (the one described in this thread) is very annoying.
1 Like