Skip to content

Commit dbbee39

Browse files
ono-maxko1
authored andcommitted
Fix bug that debugger doesn't stop at the final line in Chrome when it proceeds with 'StepOver'
The reason is that order of appending debug commands is incorrect
1 parent 1f18dc5 commit dbbee39

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/debug/server_cdp.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ def process
314314
send_response req
315315
send_event 'Debugger.resumed'
316316
when 'Debugger.stepOver'
317-
@q_msg << req
318317
begin
319318
@session.check_postmortem
320319
@q_msg << 'n'
@@ -324,9 +323,10 @@ def process
324323
send_fail_response req,
325324
code: INVALID_REQUEST,
326325
message: "'stepOver' is not supported while postmortem mode"
326+
ensure
327+
@q_msg << req
327328
end
328329
when 'Debugger.stepInto'
329-
@q_msg << req
330330
begin
331331
@session.check_postmortem
332332
@q_msg << 's'
@@ -336,9 +336,10 @@ def process
336336
send_fail_response req,
337337
code: INVALID_REQUEST,
338338
message: "'stepInto' is not supported while postmortem mode"
339+
ensure
340+
@q_msg << req
339341
end
340342
when 'Debugger.stepOut'
341-
@q_msg << req
342343
begin
343344
@session.check_postmortem
344345
@q_msg << 'fin'
@@ -348,6 +349,8 @@ def process
348349
send_fail_response req,
349350
code: INVALID_REQUEST,
350351
message: "'stepOut' is not supported while postmortem mode"
352+
ensure
353+
@q_msg << req
351354
end
352355
when 'Debugger.setSkipAllPauses'
353356
skip = req.dig('params', 'skip')

0 commit comments

Comments
 (0)