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

Allow for run --debug-adapter to match breakpoints when source is running in a sandbox #17566

Merged
merged 3 commits into from
Nov 18, 2022

Conversation

thejcannon
Copy link
Member

@thejcannon thejcannon commented Nov 17, 2022

Fixes #17540

The key is that the DAP client is sending pathMappings, which normally sets remoteRoot to "." which for run isn't true.
There's no easy way to have the server set it's own mapping so we monkeypatch.

@thejcannon thejcannon added the category:bugfix Bug fixes for released features label Nov 17, 2022
@thejcannon
Copy link
Member Author

CC @rhinck

@thejcannon
Copy link
Member Author

Another flavor of this solution incoming. Hold tight

@thejcannon
Copy link
Member Author

OK the new way doesn't require any additional action from the user

@thejcannon thejcannon requested a review from benjyw November 17, 2022 21:04
@stuhood
Copy link
Member

stuhood commented Nov 17, 2022

Thanks! Does this need cherry-picking anywhere?

@thejcannon
Copy link
Member Author

thejcannon commented Nov 17, 2022

Oh yeah good point. As far back as makes sense

Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

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

Aaaah, monkeypatching...

@thejcannon thejcannon added this to the 2.14.x milestone Nov 18, 2022
@thejcannon thejcannon merged commit 4e68e41 into pantsbuild:main Nov 18, 2022
@thejcannon thejcannon deleted the debugging-run branch November 18, 2022 17:28
thejcannon added a commit to thejcannon/pants that referenced this pull request Nov 18, 2022
…unning in a sandbox (pantsbuild#17566)

Fixes pantsbuild#17540

The key is that the DAP client is sending `pathMappings`, which normally sets `remoteRoot` to `"."` which for `run` isn't true.
There's no easy way to have the server set it's own mapping so we monkeypatch.
thejcannon added a commit to thejcannon/pants that referenced this pull request Nov 18, 2022
…unning in a sandbox (pantsbuild#17566)

Fixes pantsbuild#17540

The key is that the DAP client is sending `pathMappings`, which normally sets `remoteRoot` to `"."` which for `run` isn't true.
There's no easy way to have the server set it's own mapping so we monkeypatch.
thejcannon added a commit to thejcannon/pants that referenced this pull request Nov 18, 2022
…unning in a sandbox (pantsbuild#17566)

Fixes pantsbuild#17540

The key is that the DAP client is sending `pathMappings`, which normally sets `remoteRoot` to `"."` which for `run` isn't true.
There's no easy way to have the server set it's own mapping so we monkeypatch.
thejcannon added a commit that referenced this pull request Nov 18, 2022
…unning in a sandbox (Cherry-pick of #17566) (#17584)

Fixes #17540

The key is that the DAP client is sending `pathMappings`, which normally sets `remoteRoot` to `"."` which for `run` isn't true.
There's no easy way to have the server set it's own mapping so we monkeypatch.
thejcannon added a commit that referenced this pull request Nov 18, 2022
…unning in a sandbox (Cherry-pick of #17566) (#17583)

Fixes #17540

The key is that the DAP client is sending `pathMappings`, which normally sets `remoteRoot` to `"."` which for `run` isn't true.
There's no easy way to have the server set it's own mapping so we monkeypatch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sandbox must be disabled for VS Code remote debugging to work
4 participants