|
@@ -172,6 +172,17 @@ export class DebugService implements IDebugger {
|
|
|
this._stoppedThreads.clear();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Restarts the debugger.
|
|
|
+ * Precondition: isStarted() and stopped.
|
|
|
+ */
|
|
|
+ async restart(): Promise<void> {
|
|
|
+ await this.stop();
|
|
|
+ this.clearModel();
|
|
|
+ this._stoppedThreads.clear();
|
|
|
+ await this.start();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Restore the state of a debug session.
|
|
|
* @param autoStart - when true, starts the debugger
|