Skip to content

Commit

Permalink
debug: terminate session when debugged extension gets closed
Browse files Browse the repository at this point in the history
fixes #4239
  • Loading branch information
isidorn committed Mar 30, 2016
1 parent 8fcfc7c commit 489be2c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { ITextFileService } from 'vs/workbench/parts/files/common/files';
import { IWorkspaceContextService } from 'vs/workbench/services/workspace/common/contextService';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IWindowService, IBroadcast } from 'vs/workbench/services/window/electron-browser/windowService';
import { ILogEntry, EXTENSION_LOG_BROADCAST_CHANNEL, EXTENSION_ATTACH_BROADCAST_CHANNEL } from 'vs/workbench/services/thread/electron-browser/threadService';
import { ILogEntry, EXTENSION_LOG_BROADCAST_CHANNEL, EXTENSION_ATTACH_BROADCAST_CHANNEL, EXTENSION_TERMINATE_BROADCAST_CHANNEL } from 'vs/workbench/services/thread/electron-browser/threadService';
import { ipcRenderer as ipc } from 'electron';

const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint';
Expand Down Expand Up @@ -144,7 +144,11 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
// attach: PH is ready to be attached to
if (broadcast.channel === EXTENSION_ATTACH_BROADCAST_CHANNEL) {
this.rawAttach(broadcast.payload.port);
return;
}

if (broadcast.channel === EXTENSION_TERMINATE_BROADCAST_CHANNEL) {
this.onSessionEnd();
return;
}

Expand Down

0 comments on commit 489be2c

Please sign in to comment.