atom-julia-client
atom-julia-client copied to clipboard
debugger keybindings and stuff
Just putting this here since I'll forget otherwise.
by @TsurHerman
REPL and debugging and BreakPoints are all very similar concepts Cntrl-enter = Evaluate block = Step over .... and we should also have Cntrl-shift-enter(or some other shortcut) = Evaluate into block = Step into
Hi @pfitzseb , just a few more comments. Regarding the keybindings : I am used to f10 = step over . f11 = step into this is the standard in Visual Studio C/C++ and in Matlab. Which were my primary tools for a long time. in anyway it probably should be configurable.
And another thing.. I think the Step Into can be implemented in the REPL without using any additional debugger. For example if you have a "step into" for a function defined in some module . then it can be replaced with a Let definition for the input variables and then just eval'ing the AST for that function in that module.
Probably there are more subtleties but maybe it is doable in that way and if so then the problem of debugging and code engineering will be greatly simplified.
The stepping is handled by ASTInterpreter.jl, which is a pure julia dependency and basically does stepping how you describe it. For breakpoints on the other hand we need Gallium.jl, which is a bit more heavy weight.
Re keybindings: They are configurable anyways, but we should still pick sensible defaults. It might actually make sense to have Ctrl-Enter
be Step to next line
and Ctrl-Shift-Enter
be Finish function
, since that seems most similar to what they do when evaling code. Only problem with that is that those probably aren't the most commonly used stepping commands...