Debug.jl
Debug.jl copied to clipboard
Trap ERROR
It would be very useful to be able to have the debugger to trap ERROR so you could inspect the stack on ERRORs.
Great work putting together this debug framework btw! :)
One reason that I haven't implemented this is because I'm a bit unclear on how it would work. Exceptions can occur as part of normal program execution; you can't be sure that it was a problem until you find out that the exception was uncaught. For that case, I put down some thoughts in #28.
Another possibility could be to have an option to trap on exceptions as soon as they try to unwind instrumented code. After all, exceptions are rarely used in normal control flow in Julia. Either you could always let the exception propagate, and break at each scope that it is about to leave. Or you could let the user decide to silence the exception and carry on.
What did you have in mind?
And thanks :)
I support this request as well. Can add a parameter to @debug
about which error to trap (or trap them all), and in the debugger you can just step or continue.