Skip to content

Commit 87b1fab

Browse files
k0kubunko1
authored andcommitted
Add skip_src option to LineBreakpoint
1 parent f90f98a commit 87b1fab

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/debug/breakpoint.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module DEBUGGER__
66
class Breakpoint
77
include SkipPathHelper
88

9-
attr_reader :key
9+
attr_reader :key, :skip_src
1010

1111
def initialize cond, command, path, do_enable: true
1212
@deleted = false
@@ -145,10 +145,11 @@ def self.copy bp, root_iseq
145145
nbp
146146
end
147147

148-
def initialize path, line, cond: nil, oneshot: false, hook_call: true, command: nil, skip_activate: false
148+
def initialize path, line, cond: nil, oneshot: false, hook_call: true, command: nil, skip_activate: false, skip_src: false
149149
@line = line
150150
@oneshot = oneshot
151151
@hook_call = hook_call
152+
@skip_src = skip_src
152153
@pending = false
153154

154155
@iseq = nil

lib/debug/thread_client.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,10 @@ def suspend event, tp = nil, bp: nil, sig: nil, postmortem_frames: nil, replay_f
291291
end
292292

293293
if event != :pause
294-
show_src
295-
show_frames CONFIG[:show_frames]
294+
unless bp&.skip_src
295+
show_src
296+
show_frames CONFIG[:show_frames]
297+
end
296298

297299
set_mode :waiting
298300

0 commit comments

Comments
 (0)