Skip to content

Commit

Permalink
Support for terminate request of debug adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
deitry committed Mar 4, 2021
1 parent b45340c commit bc92d9c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changes
3.0.4
=====
- Minor changes in exception handling to track down https://github.com/Unity-Technologies/vscode-unity-debug/issues/183
- More graceful debugger stop by supporting `terminate` request

3.0.3
=====
Expand Down
2 changes: 1 addition & 1 deletion MonoDebug
Submodule MonoDebug updated 1 files
+11 −1 src/DebugSession.cs
2 changes: 2 additions & 0 deletions UnityDebug/UnityDebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ public override void Initialize(Response response, dynamic args)

supportsSetVariable = true,

supportsTerminateRequest = true,

// This debug adapter does not support exception breakpoint filters
exceptionBreakpointFilters = new ExceptionBreakpointsFilter[0]
});
Expand Down
3 changes: 2 additions & 1 deletion typescript/attach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function startSession(context: ExtensionContext, config: any) {
let execCommand = "";
if (process.platform !== 'win32')
execCommand = "mono ";

exec(execCommand + context.extensionPath + "/bin/UnityDebug.exe list", async function (error, stdout, stderr) {
const processes = [];
const lines = stdout.split("\n");
Expand All @@ -111,6 +112,7 @@ function startSession(context: ExtensionContext, config: any) {
processes.push(lines[i]);
}
}

if (processes.length == 0) {
window.showErrorMessage("No Unity Process Found.");
} else {
Expand All @@ -125,7 +127,6 @@ function startSession(context: ExtensionContext, config: any) {
"__exceptionOptions": exceptions.convertToExceptionOptionsDefault()
}
let response = await debug.startDebugging(undefined, config);
console.log("8");

console.log("debug ended: " + response);
}
Expand Down

0 comments on commit bc92d9c

Please sign in to comment.