Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Respect breakpoints even when in a skipped path #850

Merged
merged 1 commit into from
Nov 30, 2022
Merged

🐛 Respect breakpoints even when in a skipped path #850

merged 1 commit into from
Nov 30, 2022

Conversation

marianosimone
Copy link
Contributor

Description

This makes sure that we also check that there's no breakpoint in the path we are about to skip, so VSCode can properly go to the definition.

Not doing so makes the debugger stop, but not go to the definition, which is confusing.

Fixes #849

@ko1
Copy link
Collaborator

ko1 commented Nov 30, 2022

Could you apply the following patch and don't pass the session id?

diff --git a/lib/debug/session.rb b/lib/debug/session.rb
index a38bb0b..74eb6b6 100644
--- a/lib/debug/session.rb
+++ b/lib/debug/session.rb
@@ -151,10 +151,10 @@ module DEBUGGER__
       !@q_evt.closed?
     end

-    def stop_stepping? file, line, subsession_id
+    def stop_stepping? file, line, subsession_id = nil
       if @bps.has_key? [file, line]
         true
-      elsif @subsession_id != subsession_id
+      elsif subsession_id && @subsession_id != subsession_id
         true
       else
         false

@ko1 ko1 merged commit 8d39c6c into ruby:master Nov 30, 2022
@ko1
Copy link
Collaborator

ko1 commented Nov 30, 2022

I'll apply the prev comment. Thank you!

ko1 added a commit that referenced this pull request Nov 30, 2022
@marianosimone marianosimone deleted the fix-849 branch November 30, 2022 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

"Skip path" configuration makes VSCode stop at breakpoint, but not jump to definition
2 participants