ASTInterpreter.jl icon indicating copy to clipboard operation
ASTInterpreter.jl copied to clipboard

Specific use-case

Open quinnj opened this issue 9 years ago • 3 comments

So every once in a while I need to debug an error or segfault in ODBC and it's currently pretty painful because I have to manually step through so many levels of code (user-level, lower-level, API level, etc.). One use-case I thought of watching the presentation today would involve doing something like:

@enterall ODBC.query("select * from table") > output.debug

which would effectively do @enter, then prehood fr v to print the current frame variables for every frame, then si through every frame. Obviously this would generate huge walls of text as you're literally stepping in and through every call and printing the variables at each step, but sometimes that's almost what I want anyway when debugging some hard-to-find segfault. I could print it out and read it on the train in the morning :)

Anyway, I thought I'd post in case this is already trivial or if there's a quick pointer on how to write something like this if only for my own use.

quinnj avatar Jun 22 '16 23:06 quinnj

The debugger is quite easily scriptable, so this is quite doable. If it's a segfault though, I may have something better for you assuming you're using Linux.

Keno avatar Jun 22 '16 23:06 Keno

I'm on OSX usually, but have access to a linux box. Any pointers on scripting the debugger?

quinnj avatar Jun 23 '16 20:06 quinnj

There should be a cleaner API but check in test/stepping.jl

Keno avatar Jun 25 '16 20:06 Keno