Skip to content

Commit

Permalink
Fix bug that debugger doesn't stop at the final line in Chrome when i…
Browse files Browse the repository at this point in the history
…t proceeds with 'StepOver'

The reason is that order of appending debug commands is incorrect
  • Loading branch information
ono-max authored and ko1 committed Dec 15, 2021
1 parent 1f18dc5 commit dbbee39
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/debug/server_cdp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ def process
send_response req
send_event 'Debugger.resumed'
when 'Debugger.stepOver'
@q_msg << req
begin
@session.check_postmortem
@q_msg << 'n'
Expand All @@ -324,9 +323,10 @@ def process
send_fail_response req,
code: INVALID_REQUEST,
message: "'stepOver' is not supported while postmortem mode"
ensure
@q_msg << req
end
when 'Debugger.stepInto'
@q_msg << req
begin
@session.check_postmortem
@q_msg << 's'
Expand All @@ -336,9 +336,10 @@ def process
send_fail_response req,
code: INVALID_REQUEST,
message: "'stepInto' is not supported while postmortem mode"
ensure
@q_msg << req
end
when 'Debugger.stepOut'
@q_msg << req
begin
@session.check_postmortem
@q_msg << 'fin'
Expand All @@ -348,6 +349,8 @@ def process
send_fail_response req,
code: INVALID_REQUEST,
message: "'stepOut' is not supported while postmortem mode"
ensure
@q_msg << req
end
when 'Debugger.setSkipAllPauses'
skip = req.dig('params', 'skip')
Expand Down

0 comments on commit dbbee39

Please sign in to comment.