Skip to content

Commit 82aa459

Browse files
committed
Catch if dotnet debugger already stopped
1 parent 5bdc6ab commit 82aa459

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/features/DebugSession.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,14 @@ export class DebugSessionFeature extends LanguageClientConsumer
409409
}
410410
};
411411

412-
await dotnetAttachSession.customRequest(
413-
disconnectRequest.command,
414-
disconnectRequest.arguments
415-
);
412+
try {
413+
await dotnetAttachSession.customRequest(
414+
disconnectRequest.command,
415+
disconnectRequest.arguments
416+
);
417+
} catch (err) {
418+
this.logger.writeWarning(`Disconnect request to C# debugger failed: ${err}`);
419+
}
416420
});
417421
});
418422

0 commit comments

Comments
 (0)