Ancestors

Written by Steven Harman on 2024-10-14 at 20:39

Looking for help moving from #Ruby byebug to ruby/debug - specifically navigating the stack. Say I've s[tep into] a frame and now I'm done and want to finish that frame and resume where the frame returned. With byebug up would do that.

But with ruby/debug I need to fin[ish frame] and then n[ext]. While ruby/debug has up, it seems to "move" the debugger around frames, w/o actually executing anything. I suppose that makes sense, but seems different than up in byebug, no?

=> More informations about this toot | More toots from stevenharman@ruby.social

Toot

Written by Steven Harman on 2024-10-14 at 20:41

Even @st0012's great guide says up is the same in both byebug and ruby/debug, but that's not what I'm seeing. Though… now that I've said it, I'm wondering if this is a specific way that pry-byebug interacts?

i.e., maybe pry-byebug is making up behave differently than vanilla byebug?

[#]Ruby

=> More informations about this toot | More toots from stevenharman@ruby.social

Descendants

Written by Henry Maddocks on 2024-10-15 at 04:59

@stevenharman @st0012 IME pry does unexpected things

=> More informations about this toot | More toots from acute_distress@ruby.social

Written by zenspider on 2024-10-15 at 05:31

@st0012 @stevenharman pry-byebug's up/down are stack movement but they're not execution. out (or is it finish?) would be "execute out of this level"...

What are you seeing?

=> More informations about this toot | More toots from zenspider@ruby.social

Written by Steven Harman on 2024-10-16 at 14:31

@zenspider @st0012 For years I've used up like this:

  1. step into a method (new frame)

  1. next (or just look around, etc…)

  1. up to pop back out of the method (out of the frame)

  1. next to continue investigating

Both byebug's docs and you are saying that's not how it works. And intellectually that makes sense to me. But I could swear it did/does.

In any case, I'm wondering, with ruby/debug, if fin[ish frame] + n[ext] is the way to get out of the frame? What about u[ntil]?

=> More informations about this toot | More toots from stevenharman@ruby.social

Written by zenspider on 2024-10-17 at 08:07

@st0012 @stevenharman don't use debug much yet so I dunno on that side.

On pry-byebug's side: you can definitely do something like up + next/continue. I believe it starts from whatever context you're currently in. I've used that to change values and try again in debugging sessions to test hypotheses.

=> More informations about this toot | More toots from zenspider@ruby.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113307712707785765
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
292.101827 milliseconds
Gemini-to-HTML Time
2.888547 milliseconds

This content has been proxied by September (3851b).