Skip to content

DAP: introduce Rdbg Trace Inspector - #959

Merged
ko1 merged 1 commit into
ruby:masterfrom
ono-max:rdbg-inspector
Apr 29, 2023
Merged

DAP: introduce Rdbg Trace Inspector#959
ko1 merged 1 commit into
ruby:masterfrom
ono-max:rdbg-inspector

Conversation

@ono-max

@ono-maxono-max commented Apr 8, 2023

Copy link
Copy Markdown
Member

Summary

We introduce Rdbg Trace Inspector. This is useful when tracing in VS Code. Users can search tracing logs easily and get a lot of useful information by using Rdbg Trace Inspector. For example, users can know which method is called, which line is executed, local variables at some point, and so on.

How to use it

  1. Click on "Start Trace" in TRACE INSPECTOR view
  2. Execute the program

That's it! You can check the location and returned value by clicking the trace log.

Several demos

Trace Call/Return

Users can know which method is called, its parameters, and return values.

Screen.Recording.2023-04-16.at.14.50.48.mov

Record & Replay

This is slow, but Users can get a wealth of information by enabling Record & Replay. For example, users can know the backtrace and local variables during the execution.

Screen.Recording.2023-04-16.at.14.28.48.mov

Other

Trace Call and Trace Line are enabled in the default. Users can select Record & Replay from the menu.
Also, users can enter Regular Expressions to trace only matched events as follows.

Screen.Recording.2023-04-17.at.15.36.52.mov

Users can copy the specific log as follows:

Screen.Recording.2023-04-22.at.16.23.42.mov

Some Notes: This PR is the combination of #946 and #916. After discussing with @ko1-san, we decided to combine record inspector and trace inspector.

@ono-maxono-max changed the title DAP: introduce Rdbg Record InspectorDAP: introduce Rdbg InspectorApr 8, 2023
@ono-max
ono-max marked this pull request as draft April 9, 2023 14:54
@ono-max
ono-maxforce-pushed the rdbg-inspector branch 2 times, most recently from 02b0216 to 4dc44d3CompareApril 17, 2023 11:17
@ono-maxono-max changed the title DAP: introduce Rdbg InspectorDAP: introduce Rdbg Trace InspectorApr 17, 2023
@ono-max
ono-max marked this pull request as ready for review April 17, 2023 15:00
Comment threadlib/debug/frame_info.rb Outdated
end
end

def get_params

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defiseq_parameters_info
...
when:block,:methodparameters_infoelsenilend

module DAP_TraceInspector
class MultiTracer < Tracer
MAX_LOG_SIZE = 4000
def initialize ui, evts, trace_params, **kw

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_log_size: 4000

@ono-max
ono-maxforce-pushed the rdbg-inspector branch 8 times, most recently from 35eef6a to c38c836CompareApril 29, 2023 04:53
@ko1
ko1 merged commit caeb4c9 into ruby:masterApr 29, 2023
@ono-max
ono-max deleted the rdbg-inspector branch April 29, 2023 23:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ono-max@ko1