-
Notifications
You must be signed in to change notification settings - Fork 21
breakpoints #197
Description
Hi all, in a meeting a few weeks ago, @ViralBShah asked us for some feedback on the debugger. Here is my take on it:
Having a working @enter
as we do now is great! Thanks for implementing that! I agree with @rejuvyesh that keeping that working should be priority number 1. But unfortunately @show
and @assert
are still my most effective tools for debugging (and this is definitely suboptimal). The reason is that I have never been able to conveniently set breakpoints in Gallium.
I think I am in the same camp as the people in the discourse debug discussion who are scientists first, programmers second. Here is what typically happens: I write a big, complex simulation that involves random numbers. 2 minutes into the simulation, it has an error halfway through a 50 line function because some value is outside of its feasible range. My first thought is "how do I get there". I could do it with @enter
, but then I have to do a prohibitive amount of thinking about how to record the inputs for the function (basically building a test fixture) which might include a random number generator state, etc.
The best debugging experience I've had in Julia was the old Debug.jl package, and I have heard others say this as well. In Debug.jl, interaction with the code was much worse, but setting breakpoints where I need them is much more important. Some (@mykelk) will make the (valid) argument that having to change code is bad, but I think this is a secondary issue, especially in light of the usefulness of pdb to scientists that program in python.
Perhaps breaking at points other than a function call is difficult in the Gallium framework, and I certainly don't mean to disparage your efforts - they have been impressive, but, in my opinion, to make the package really useful, there needs to be a way to insert conditional breakpoints into the code.
Thanks for considering this!
If this isn't appropriate for an issue, feel free to close and I can move it to the appropriate place (maybe discourse).