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

Containers not being removed after debugging when using hotkeys to restart debugging #2676

Closed
Technoguyfication opened this issue Jan 26, 2021 · 4 comments · Fixed by #2786
Closed

Comments

@Technoguyfication
Copy link

Summary:

When using removeContainerAfterDebug in my launch.json, containers aren't being removed after debugging when using the Ctrl+Shift+F5 hotkey to restart debugging. They're removed just fine when clicking the restart button, just not when using the hotkey.

How to reproduce:

  1. Set up docker container debugging with vscode (I'm using node.js)
  2. Set removeContainerAfterDebug to true in launch.json in the launch configuration object
  3. Start a container and begin debugging
  4. Restart debugging using the hotkey (Ctrl+Shift+F5)
  5. The previous container is not removed as it should be

Expected behavior:

The container should be removed after debugging, the same as when you click the restart debugging button with the mouse.

@bwateratmsft
Copy link
Contributor

Could be related to how VSCode handles tasks; we'll have to investigate.

@bwateratmsft
Copy link
Contributor

I've investigated and found that this issue is external: microsoft/vscode#117984

When restarting debugging via the UI button, vscode.debug.onDidTerminateDebugSession does get called. However, when restarting with Ctrl+Shift+F5, it does not get called, and we do not shut down the container.

@bwateratmsft
Copy link
Contributor

Reopening. The root problem is actually in this extension; we misunderstood how the restart flow works.

@bwateratmsft
Copy link
Contributor

This fix is now released with Docker extension version 1.12.0.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants