I'm not sure that an instrumenting debugger can be made to work well for Julia, but maybe.
One issue is performance and what code you instrument. If you instrument everything, then you'll get an impractical slowdown: `1+2` is defined in Julia code – if you instrument everything, that becomes a function call that calls back into the debugger instead of a single add instruction. You could would instrument only user code, not Base or packages (you'd need a way of indicating what to instrument). That would address some of the performance problem. You wouldn't want to try to debug user code that was too computationally intensive, however, since it would take a really, really long time to run – but you could debug things that don't take too long to run. Another issue is how to switch to debug mode. Do you start julia with --debug mode? We can't replace already-compiled versions of your code with an instrumented version without solving #265 first. So you could potentially have an instrumenting debugger experience that looks like this: run a script using `julia --debug script.jl` and it will allow you to step through functions defined in the script, maybe other code that it loads, maybe optionally packages – but not any functionality in Base. That might be useful to people, but it's not an ideal debugging experience. It could be worth taking a crack at though. The really hard part is designing the instrumentation so that it doesn't completely destroy performance. On Tue, Jun 2, 2015 at 1:26 PM, Tim Holy <tim.h...@gmail.com> wrote: > I don't think Debug was mentioned explicitly in your original post, but I > see > you did say "navigate stack frames" and certainly Debug can't do that. > > How exactly do you think that can be accomplished, without doing something > along the lines of what Keno is doing? I don't have the impression that > seamless julia/c is his primary focus; I think it's more that it will be a > nice side effect of just getting stack-frame-navigating debugging working. > > I think the reason Debug.jl hasn't gotten a lot of attention is because > it's > basically "done," meaning that it's not obvious (to me at least) that an > instrumenting debugger can get much better. If you have some concrete > suggestions, they could be very interesting. > > Best, > --Tim > > On Tuesday, June 02, 2015 09:04:58 AM Michael Turok wrote: > > Yes - but it hasn't gotten much attention over the last two years (and > > sorry, I thought I had mentioned Debug.jl in my initial post). > > > > https://github.com/toivoh/Debug.jl/graphs/code-frequency > > > > Feels like there could be a lot of work there that would be tremendously > > helpful, but not sure if people are focused on it (and instead attention > is > > on being able to seamlessly navigate from julia -> c). > > > > Is anyone working on extending the functionality there, or is it viewed > as > > a developmental dead end? > > > > Michael > > > > On Tuesday, June 2, 2015 at 11:31:04 AM UTC-4, Tim Holy wrote: > > > https://github.com/toivoh/Debug.jl > > > < > https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Ftoivoh%2FDebug.jl > > > &sa=D&sntz=1&usg=AFQjCNFVItS_nt9vtR2lzYEoYZu8ZhxJwA> > > > > > > --Tim > > > > > > On Tuesday, June 02, 2015 08:21:51 AM Michael Turok wrote: > > > > Right, but I'm interested in an debugger that would work without a > > > > > > custom > > > > > > > compilation of LLVM, and would work with a stock release of julia > 0.3*. > > > > > > > > On Tuesday, June 2, 2015 at 11:11:09 AM UTC-4, Isaiah wrote: > > > > > https://groups.google.com/d/msg/julia-dev/gcZ5dZJni5o/VYaLkCd756cJ > > > > > > > > > > On Tue, Jun 2, 2015 at 11:07 AM, Michael Turok < > michae...@gmail.com > > > > > > > > > > <javascript:>> wrote: > > > > >> Is there anyone currently focusing on building an AST-level > debugger > > > > > > that > > > > > > > >> can navigate stack frames and not require modifying code to insert > > > > >> instrumentation stubs, etc? > > > > >> > > > > >> While the LLVM JIT debugger referenced in the below thread from > > > > > > December > > > > > > > >> 2013 is interesting, seems like there might be more low-lying > fruit > > > > > > out > > > > > > > >> there..... > > > > > > > https://groups.google.com/forum/#!searchin/julia-users/debugger/julia-use > > > > > > > >> rs/zEqWxn7HDVo/ZTRZh4ziR9kJ > >