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
Problem with the VS Code Stop Debugging API #140560
Comments
@SuseeJeeva the comment of
Since you are omitting a debug session argument, all debug sessions are terminated. If you want to make sure that the correct session gets stopped, I suggest that you register an event handler Blindly relying on Here is some untested sample code: var myDebugSession: vscode.DebugSession | undefined;
vscode.debug.onDidStartDebugSession(session => {
if (session.configuration.name === '.NET Core Attach') {
myDebugSession = session;
}
});
setTimeout(() => {
if (myDebugSession) {
vscode.debug.stopDebugging(myDebugSession);
}
}, 5000); |
@weinand , thank you for your comments. I am still facing the same issue even if I follow the steps you suggested. My requirement is, I wanted to achieve the below operation:
However, If I click on the "Disconnect" Icon manually in the "Extension Development Host", it is properly getting disconnected. Attaching the image for your reference. What I believe is, the stopDebugging API is essentially triggering the below operation: (Stop) Here is my updated code and its result: Terminating my console application: Please let me know your thoughts. Thanks in advance, |
@SuseeJeeva I've fixed the issue - please try tomorrow's Insiders. |
@weinand Thank you for the quick support. Sure, I shall try with the Insiders |
@weinand , the issue is resolved in the Insiders version. Thanks, |
@weinand great, thanks for verifying my fix! |
Hi all,
My objective is to create a VS Code Extension which can ATTACH debugger to a running .NET Console Application
I have a .NET Console Application running parallelly (The Console Application was not attached to the Visual Studio Debugger)
And I have created a VS Code Extension. (Used the default "Hello World" Extension)
In the Extension, I had the below code:
I am not sure why the vscode.debug.stopDebugging() API terminates the Console Application (Since the Debug Configuration request is ATTACH (but not LAUNCH)
Please help me understand what I am doing wrong here.
Thanks in Advance,
Susee
The text was updated successfully, but these errors were encountered: