Skip to content

Commit ceeeefa

Browse files
committed
DAP: disable all BPs on disconnected
DAP set breakpoints and on the disconnected timing they should be removed, otherwise debugger try to send DAP request and fail it because connection is already closed.
1 parent 510ddee commit ceeeefa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/debug/server_dap.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ def process
361361
end
362362
end
363363

364+
SESSION.clear_all_breakpoints
364365
send_response req
365366

366367
## control

lib/debug/session.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,10 @@ def clear_catch_breakpoints *exception_names
13861386
end
13871387
end
13881388

1389+
def clear_all_breakpoints
1390+
clear_breakpoints{true}
1391+
end
1392+
13891393
def add_iseq_breakpoint iseq, **kw
13901394
bp = ISeqBreakpoint.new(iseq, [:line], **kw)
13911395
add_bp bp

0 commit comments

Comments
 (0)