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

Use a CustomRequest to disconnect the dotnet debugger from attach sessions. #4704

Merged
merged 13 commits into from
Aug 20, 2023

Conversation

JustinGrote
Copy link
Collaborator

@JustinGrote JustinGrote commented Aug 18, 2023

PR Summary

The vscode stopDebugging API when used with the dotnet debugger would kill the powershell process if it was in attach mode, so we use a customRequest DAP message to disconnect the dotnet debugger since there is no vscode direct API for disconnecting the debug session.

Fixes #4702

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

@JustinGrote JustinGrote requested a review from a team August 18, 2023 01:40
@JustinGrote JustinGrote self-assigned this Aug 18, 2023
@JustinGrote
Copy link
Collaborator Author

@andyleejordan should we bring in https://www.npmjs.com/package/@vscode/debugprotocol as a dependency for strong typing of the custom disconnect request? esbuild should tree shake it and not increase the overall file size much.

@andyleejordan
Copy link
Member

@andyleejordan should we bring in https://www.npmjs.com/package/@vscode/debugprotocol as a dependency for strong typing of the custom disconnect request? esbuild should tree shake it and not increase the overall file size much.

Yes!

@JustinGrote
Copy link
Collaborator Author

Yes!

Since the only thing we need to bring in is an interface, it should be fine as a dev dependency

@JustinGrote
Copy link
Collaborator Author

I made a slight change to use the full request type as the template, because hovering it will provide full intellisense over what this request does.
image

Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

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

Just me being annoying with spacing and wishing ESLint were better at things like that.

package.json Outdated Show resolved Hide resolved
package-lock.json Outdated Show resolved Hide resolved
src/features/DebugSession.ts Outdated Show resolved Hide resolved
src/features/DebugSession.ts Outdated Show resolved Hide resolved
@andyleejordan andyleejordan disabled auto-merge August 18, 2023 22:36
JustinGrote and others added 3 commits August 20, 2023 08:22
Co-authored-by: Andy Jordan <2226434+andyleejordan@users.noreply.github.com>
Co-authored-by: Andy Jordan <2226434+andyleejordan@users.noreply.github.com>
@JustinGrote
Copy link
Collaborator Author

Just me being annoying with spacing and wishing ESLint were better at things like that.

@andyleejordan Prettier is focused on whitespace stuff and interoperates with ESLint, we can explore adding it to the toolchain.

@JustinGrote
Copy link
Collaborator Author

Test Failure on 5.1 doesn't appear to be related to this PR, so I'm going to merge it.

@JustinGrote JustinGrote added this pull request to the merge queue Aug 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 20, 2023
@JustinGrote JustinGrote added this pull request to the merge queue Aug 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 20, 2023
@JustinGrote JustinGrote added this pull request to the merge queue Aug 20, 2023
Merged via the queue into main with commit bf54870 Aug 20, 2023
@JustinGrote JustinGrote deleted the justingrote/feature/detachDotnetDebugger branch August 20, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants