Just Another Ruby Debugger. Provide a rich Terminal UI that visualizes everything your need, navigates your program with pleasure, stops at matter places only, reduces manual and mental efforts. You can now focus on real debugging.
it is not apparently possible to step into the foo call. When Jard stops on this line, Step will step into the #to_h call. Unlike something like byebug, Step Out does not take me back to the foo(bar.to_h) line but appears to step up/out past it or perhaps just steps over it (it's hard to tell).
To Reproduce
Enter jard before a method call that contains arguments which need evaluation via a method call. For instance:
F7 will take you to the first evaluated method call (request.referrer or request, depending on whether request is a local var or a method)
Shift+F7 will take you to line after the initial break point (or a frame higher, if the breakpoint was the last line.
Expected behavior
There should be someway step into redirect_to (and any other calls on that break point). For instance, byebug (and pry-byebug) you could do step, up, step, up, step and you would be inside redirect_to. It's clumsy, but it works.
Ideally, jard would underline the call which it would next step into, but admittedly that may be impossible to do reliably. However, it would look something like:
redirect_to(r͟e͟q͟u͟e͟s͟t͟.referrer || request.fullpath)
redirect_to(request.r͟e͟f͟e͟r͟r͟e͟r͟ || request.fullpath)
redirect_to(request.referrer || r͟e͟q͟u͟e͟s͟t͟.fullpath) # in the case where `request.referrer` is `nil`
redirect_to(request.referrer || request.f͟u͟l͟l͟p͟a͟t͟h͟) # in the case where `request.referrer` is `nil`
r͟e͟d͟i͟r͟e͟c͟t͟_͟t͟o͟(request.referrer || request.fullpath)
I am pretty confident this is not possible without some pretty advanced static analysis, but it does at least illustrate the steps that are expected to be able to be taken manually.
Screenshots
(inline in reproduction steps)
Environment (please complete the following information):
OS: ArchLinux
Terminal Emulator: GNOME Terminal
Output when you run tput colors in your terminal: 256
Output when you run echo $TERM in your terminal: xterm-256color
Output when you run stty:
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8
Do you use tmux/screen or similar tty multiplexer? no
Describe the bug
Given code such as:
it is not apparently possible to step into the
foo
call. When Jard stops on this line,Step
will step into the#to_h
call. Unlike something likebyebug
,Step Out
does not take me back to thefoo(bar.to_h)
line but appears to step up/out past it or perhaps just steps over it (it's hard to tell).To Reproduce
Enter
jard
before a method call that contains arguments which need evaluation via a method call. For instance:F7
will take you to the first evaluated method call (request.referrer
orrequest
, depending on whetherrequest
is a local var or a method)Shift+F7
will take you to line after the initial break point (or a frame higher, if the breakpoint was the last line.Expected behavior
There should be someway step into
redirect_to
(and any other calls on that break point). For instance,byebug
(andpry-byebug
) you could dostep
,up
,step
,up
,step
and you would be insideredirect_to
. It's clumsy, but it works.Ideally,
jard
would underline the call which it would next step into, but admittedly that may be impossible to do reliably. However, it would look something like:I am pretty confident this is not possible without some pretty advanced static analysis, but it does at least illustrate the steps that are expected to be able to be taken manually.
Screenshots
(inline in reproduction steps)
Environment (please complete the following information):
tput colors
in your terminal: 256echo $TERM
in your terminal: xterm-256colorstty
: