You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g. save scope or call stack from the last trap point, allow to step around in the scopes and evaluate expressions. Hopefully, after an unhandled error in instrumented code, it would be enough to invoke Debug.pm() to activate post-mortem debugging.
Saving away scopes like this might keep some objects alive longer than otherwise intended, but most julia code should hopefully not depend on gc cleanup? Eventually, there could be an option whether to allow keeping scopes that have been exited.
The text was updated successfully, but these errors were encountered:
I think a post-mortem feature would be very useful. How hard do you think it is to add? It seems like the state of the last trap could just be saved in the Debug module, however, I'm not sure how to reconstruct the program state. If you have some time I'd be willing to put some effort into this to make julia development easier.
This would indeed be a very welcome feature. I don't think that it should be so hard to add. I think that a reasonable first step would be to save the scope from the last trap. Then the pm-debugger could then do everything that the regular debugger can do without access to a node.
Going forward, it might be interesting to
attach some position information to scopes
save not just the last scope, but a whole call stack of scopes. Otherwise we only get the lexically enclosing ones (as parents of the innermost one)
I don't have great amounts of time right now, but if you want to give it a try, I am willing to discuss design and review changes.
E.g. save scope or call stack from the last trap point, allow to step around in the scopes and evaluate expressions. Hopefully, after an unhandled error in instrumented code, it would be enough to invoke
Debug.pm()
to activate post-mortem debugging.Saving away scopes like this might keep some objects alive longer than otherwise intended, but most julia code should hopefully not depend on gc cleanup? Eventually, there could be an option whether to allow keeping scopes that have been exited.
The text was updated successfully, but these errors were encountered: