-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersverifiedVerification succeededVerification succeeded
Milestone
Description
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:
// Attach the debugger --- This is working as per the expectation
vscode.debug.startDebugging(undefined, {
name: ".NET Core Attach",
type: "coreclr",
request: "attach", // Please note that the request is ATTACH
processId: "18876" // Manually configured the Console Application's process ID
}, undefined);
// This is a dummy timer which waits for 5 secs
setTimeout(() => {
//This piece of code is stopping the debugger BUT ALSO TERMINATE MY CONSOLE APPLICATION which is not expected
vscode.debug.stopDebugging();
//I have tried the below code as well, but no luck
//vscode.debug.stopDebugging(vscode.debug.activeDebugSession);
}, 5000)
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code InsidersverifiedVerification succeededVerification succeeded