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

Fix "Continue" for multiple breakpoints in the same script #324

Merged

Conversation

kurtlachmann
Copy link
Contributor

Fixes issue #296

When starting a new debug session a setBreakPointsRequest() is triggered for each file that contains breakpoints.
However at that time this.project_path is still undefined. It will only be initialized during the launchRequest().
Trying to pass undefined into path.relative() will cause a type error which means the setBreakPointsRequest() will fail and exit after the first breakpoint of each file.

With this fix we skip the respective lines during initialization.
At that time the project_path is still unknown so we can't construct the relative path.
Also the Mediator isn't connected yet, so these lines wouldn't do anything anyway.

When starting a new debug session `this.project_path` is still undefined.
Trying to pass that into `path.relative()` will cause a type error.
Therefore the setBreakPointsRequest will fail after the first breakpoint.
That's why it will only process the first breakpoint of a file.
@Calinou Calinou added the bug label Feb 24, 2022
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Congratulations for your first merged pull request 🎉

@Calinou Calinou merged commit c03ab7e into godotengine:master Feb 24, 2022
@kurtlachmann kurtlachmann deleted the fix-multiple-breakpoints-per-file branch February 25, 2022 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants