Skip to content

Commit f31c929

Browse files
committed
add ExitedEvent; fixes #247
1 parent 523a4b3 commit f31c929

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

adapter/src/debugSession.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,19 @@ export class TerminatedEvent extends Event implements DebugProtocol.TerminatedEv
182182
}
183183
}
184184

185+
export class ExitedEvent extends Event implements DebugProtocol.ExitedEvent {
186+
body: {
187+
exitCode: number
188+
};
189+
190+
public constructor(exitCode: number) {
191+
super('exited');
192+
this.body = {
193+
exitCode: exitCode
194+
};
195+
}
196+
}
197+
185198
export class OutputEvent extends Event implements DebugProtocol.OutputEvent {
186199
body: {
187200
category: string,

adapter/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import {
88
DebugSession,
9-
InitializedEvent, TerminatedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent,
9+
InitializedEvent, TerminatedEvent, ExitedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent,
1010
LoadedSourceEvent, CapabilitiesEvent, ProgressStartEvent, ProgressUpdateEvent, ProgressEndEvent, InvalidatedEvent,
1111
Thread, StackFrame, Scope, Variable,
1212
Breakpoint, Source, Module, CompletionItem,
@@ -24,7 +24,7 @@ export {
2424
LoggingDebugSession,
2525
Logger,
2626
logger,
27-
InitializedEvent, TerminatedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent,
27+
InitializedEvent, TerminatedEvent, ExitedEvent, StoppedEvent, ContinuedEvent, OutputEvent, ThreadEvent, BreakpointEvent, ModuleEvent,
2828
LoadedSourceEvent, CapabilitiesEvent, ProgressStartEvent, ProgressUpdateEvent, ProgressEndEvent, InvalidatedEvent,
2929
Thread, StackFrame, Scope, Variable,
3030
Breakpoint, Source, Module, CompletionItem,

0 commit comments

Comments
 (0)