Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug does not show context when navigating up & down stack #1135

Open
p-datadog opened this issue Mar 12, 2025 · 0 comments
Open

debug does not show context when navigating up & down stack #1135

p-datadog opened this issue Mar 12, 2025 · 0 comments

Comments

@p-datadog
Copy link

Your environment

  • ruby -v: any
  • rdbg -v:

Describe the bug
A clear and concise description of what the bug is.

When navigating up and down the stack, debug does not show any context around the source code.

To Reproduce

Type up or down

irb:rdbg([{"error":0,"meta":{"_dd.p.dm...):008> up
=> 109|             encoder.encode(serializable_trace).tap do |encoded|
=>#2	Datadog::Tracing::Transport::Traces::Encoder.encode_trace(encoder=Datadog::Core::Encoding::JSONEncoder, trace=#<Datadog::Tracing::TraceSegment:0x00007e..., logger=nil, native_events_supported=true) at ~/apps/dd-trace-rb/lib/datadog/tracing/transport/traces.rb:109

Expected behavior
A clear and concise description of what you expected to happen.

I expect to see context around the current line, as all other debuggers I have ever used show.

Additional context
Add any other context about the problem here.

There was a pull request fixing this bug - #1094. It was closed without being merged while there was apparent agreement that the current behavior is not good.

There was also no reason provided as to why debug does not currently show any context when navigating up and down stack frames.

Inspecting the code, the lack of context is hardcoded:

lib/debug/thread_client.rb:              show_src max_lines: 1
lib/debug/thread_client.rb:              show_src max_lines: 1
lib/debug/thread_client.rb:            show_src max_lines: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant