Conversation
|
I've been wanting this feature for a while, this looks super cool 🎉 |
We can select the option as follows: Screen.Recording.2023-02-27.at.18.03.30.mov |
Yeah, I think that we can add tests. |
lib/debug/tracer.rb
Outdated
| end | ||
|
|
||
| class MultiTracer < Tracer | ||
| MAX_LENGTH = 4000 |
| end | ||
| end | ||
|
|
||
| class MultiTracer < Tracer |
lib/debug/tracer.rb
Outdated
| @tracer = TracePoint.new(*@evts){|tp| | ||
| next if skip?(tp) | ||
|
|
||
| call_identifier_str = |
lib/debug/server_dap.rb
Outdated
| when 'return' | ||
| evts << :return | ||
| evts << :c_return | ||
| evts << :b_return |
There was a problem hiding this comment.
else
raise "unknown trace type #{evt}"
lib/debug/server_dap.rb
Outdated
| when 'enable' | ||
| events = req.dig('arguments', 'events') | ||
| evts = [] | ||
| events.each{|evt| |
There was a problem hiding this comment.
Another idea:
EVENTS = {'line' => [:line], ...}
def ...
evts = []
events.each{|evt| evts.concat EVENTS[evt]}
...or
evts = events.flat_map{|evt| EVENTS[evt]}But the current code makes sense because it is easy to read.
lib/debug/server_dap.rb
Outdated
| end | ||
| } | ||
| @ui.respond req, {} | ||
| when 'logs' |
There was a problem hiding this comment.
other subcommands are verbs so I recommend to use collect (a verb word)
d198e27 to
6d9078d
Compare
@ono-max Thanks. Could we first have some tests in the same PR? |
|
I'll try it, but I'm not sure if I can add tests in the same PR because I'm busy right now. There is a possibility they are added in the other PR. Sorry. |
6d9078d to
b9e1758
Compare
af8d49f to
35bab9d
Compare
35bab9d to
336e1dc
Compare
We'll introduce a new feature Rdbg Trace Inspector. This is useful when tracing in VS Code.
Untitled.Project.4.-.HD.1080p.mov
How to use it
That's it! You can check the location and returned value by clicking the trace log.
How to choose events
On the default, line, call, and return events are selected.
If you want to change the default, click "more items", then choose events in the context menu.
Screen.Recording.2023-02-27.at.18.03.30.mov