Skip to content

Commit 9d61054

Browse files
st0012ko1
authored andcommitted
Move skipping logic out of Config class
1 parent ad1bcb1 commit 9d61054

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

lib/debug/config.rb

-10
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ def self.config
6363
end
6464

6565
def initialize argv
66-
@skip_all = false
67-
6866
if self.class.config
6967
raise 'Can not make multiple configurations in one process'
7068
end
@@ -94,14 +92,6 @@ def []=(key, val)
9492
set_config(key => val)
9593
end
9694

97-
def skip_all
98-
@skip_all = true
99-
end
100-
101-
def skip?
102-
@skip_all
103-
end
104-
10595
def set_config(**kw)
10696
conf = config.dup
10797
kw.each{|k, v|

lib/debug/server_cdp.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def run_new_chrome
9494
stderr.close
9595

9696
at_exit{
97-
CONFIG.skip_all
97+
DEBUGGER__.skip_all
9898
FileUtils.rm_rf dir
9999
}
100100

lib/debug/server_dap.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def self.setup debug_port
1818
end
1919

2020
at_exit do
21-
CONFIG.skip_all
21+
DEBUGGER__.skip_all
2222
FileUtils.rm_rf dir if tempdir
2323
end
2424

lib/debug/session.rb

+12
Original file line numberDiff line numberDiff line change
@@ -2131,6 +2131,18 @@ class << self
21312131
end
21322132
end
21332133

2134+
# Exiting control
2135+
2136+
class << self
2137+
def skip_all
2138+
@skip_all = true
2139+
end
2140+
2141+
def skip?
2142+
@skip_all
2143+
end
2144+
end
2145+
21342146
def self.load_rc
21352147
[[File.expand_path('~/.rdbgrc'), true],
21362148
[File.expand_path('~/.rdbgrc.rb'), true],

lib/debug/thread_client.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module DEBUGGER__
1818
module SkipPathHelper
1919
def skip_path?(path)
2020
!path ||
21-
CONFIG.skip? ||
21+
DEBUGGER__.skip? ||
2222
ThreadClient.current.management? ||
2323
skip_internal_path?(path) ||
2424
skip_config_skip_path?(path)

0 commit comments

Comments
 (0)