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

Simple post mortem debugger #28

Open
toivoh opened this issue Dec 14, 2012 · 2 comments
Open

Simple post mortem debugger #28

toivoh opened this issue Dec 14, 2012 · 2 comments

Comments

@toivoh
Copy link
Owner

toivoh commented Dec 14, 2012

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.

@nfoti
Copy link
Contributor

nfoti commented Jun 29, 2013

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.

@toivoh
Copy link
Owner Author

toivoh commented Jun 29, 2013

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.

@toivoh toivoh mentioned this issue Apr 8, 2014
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

2 participants