Skip to content

Commit bcfc8ea

Browse files
committed
ignore_bp
Ignore breakpoints if no clients are attached.
1 parent 7b062e6 commit bcfc8ea

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/debug/config.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ module DEBUGGER__
4444
sock_path: ['RUBY_DEBUG_SOCK_PATH', "REMOTE: UNIX Domain Socket remote debugging: socket path"],
4545
sock_dir: ['RUBY_DEBUG_SOCK_DIR', "REMOTE: UNIX Domain Socket remote debugging: socket directory"],
4646
local_fs_map: ['RUBY_DEBUG_LOCAL_FS_MAP', "REMOTE: Specify local fs map", :path_map],
47+
ignore_bp: ['RUBY_DEBUG_IGNORE_BP', "REMOTE: Ignore breakpoints if no clients are attached", :bool, 'false'],
4748
cookie: ['RUBY_DEBUG_COOKIE', "REMOTE: Cookie for negotiation"],
4849
open_frontend: ['RUBY_DEBUG_OPEN_FRONTEND',"REMOTE: frontend used by open command (vscode, chrome, default: rdbg)."],
4950
chrome_path: ['RUBY_DEBUG_CHROME_PATH', "REMOTE: Platform dependent path of Chrome (For more information, See [here](https://github.com/ruby/debug/pull/334/files#diff-5fc3d0a901379a95bc111b86cf0090b03f857edfd0b99a0c1537e26735698453R55-R64))"],

lib/debug/server.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ def puts str = nil
334334
end
335335

336336
def readline prompt
337-
input = (sock do |s|
337+
input = (sock(skip: CONFIG[:ignore_bp]) do |s|
338+
next unless s
339+
338340
if @repl
339341
raise "not in subsession, but received: #{line.inspect}" unless @session.in_subsession?
340342
line = "input #{Process.pid}"

0 commit comments

Comments
 (0)