Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Ctrl+C doesn't work in debug console #2658

Closed
tms320 opened this issue Jul 17, 2019 · 2 comments
Closed

Ctrl+C doesn't work in debug console #2658

tms320 opened this issue Jul 17, 2019 · 2 comments

Comments

@tms320
Copy link

tms320 commented Jul 17, 2019

My OS: Windows 10 x64
VSCode version: 1.36.1
Go extension version: 0.11.4
Golang version: 1.12.6
At the end of my application I have the following code:

osSignal := make(chan os.Signal)
signal.Notify(osSignal, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
<-osSignal
fmt.Println("Terminating...")

If I run it outside the VSCode I can press Ctrl+C to terminate my application gracefully.
But if I run debug session in VSCode (via F5 button) my app runs in debug console and Ctrl+C doesn't work.
PS: and I'd like that pressing "Stop debug" button (Shift+F5) behaves as described in issue #2387

@ramya-rao-a
Copy link
Contributor

The debug console does not support this feature in VS Code in general.

Once we have #843 implemented, we can debug using the internal or external terminal which could support this feature.

PS: and I'd like that pressing "Stop debug" button (Shift+F5) behaves as described in issue #2387

Are you saying that you prefer the current behaviour of "Stop debug" button or you would prefer the fix for the issue #2387

@tms320
Copy link
Author

tms320 commented Jul 17, 2019

Thanks for your answer )

Are you saying that you prefer the current behaviour of "Stop debug" button or you would prefer the fix for the issue #2387

I mean that first click sends TERM signal (and my application will try to process this signal). The second click does a force kill my app. Ideally, this behavior must be a configured option (to send or not to send the TERM signal on first click). IMHO )

@tms320 tms320 closed this as completed Jul 19, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants