@@ -243,8 +243,8 @@ export class NativeLocalProcessExtensionHost implements IExtensionHost {
243
243
244
244
// Catch all output coming from the extension host process
245
245
type Output = { data : string ; format : string [ ] } ;
246
- const onStdout = this . _handleProcessOutputStream ( this . _extensionHostProcess . onStdout ) ;
247
- const onStderr = this . _handleProcessOutputStream ( this . _extensionHostProcess . onStderr ) ;
246
+ const onStdout = this . _handleProcessOutputStream ( this . _extensionHostProcess . onStdout , this . _toDispose ) ;
247
+ const onStderr = this . _handleProcessOutputStream ( this . _extensionHostProcess . onStderr , this . _toDispose ) ;
248
248
const onOutput = Event . any (
249
249
Event . map ( onStdout . event , o => ( { data : `%c${ o } ` , format : [ '' ] } ) ) ,
250
250
Event . map ( onStderr . event , o => ( { data : `%c${ o } ` , format : [ 'color: red' ] } ) )
@@ -258,7 +258,7 @@ export class NativeLocalProcessExtensionHost implements IExtensionHost {
258
258
} , 100 ) ;
259
259
260
260
// Print out extension host output
261
- onDebouncedOutput ( output => {
261
+ this . _toDispose . add ( onDebouncedOutput ( output => {
262
262
const inspectorUrlMatch = output . data && output . data . match ( / w s : \/ \/ ( [ ^ \s ] + : ( \d + ) \/ [ ^ \s ] + ) / ) ;
263
263
if ( inspectorUrlMatch ) {
264
264
if ( ! this . _environmentService . isBuilt && ! this . _isExtensionDevTestFromCli ) {
@@ -275,7 +275,7 @@ export class NativeLocalProcessExtensionHost implements IExtensionHost {
275
275
console . groupEnd ( ) ;
276
276
}
277
277
}
278
- } ) ;
278
+ } ) ) ;
279
279
280
280
// Lifecycle
281
281
@@ -521,7 +521,7 @@ export class NativeLocalProcessExtensionHost implements IExtensionHost {
521
521
this . _onExit . fire ( [ code , signal ] ) ;
522
522
}
523
523
524
- private _handleProcessOutputStream ( stream : Event < string > ) {
524
+ private _handleProcessOutputStream ( stream : Event < string > , store : DisposableStore ) {
525
525
let last = '' ;
526
526
let isOmitting = false ;
527
527
const event = new Emitter < string > ( ) ;
@@ -549,7 +549,7 @@ export class NativeLocalProcessExtensionHost implements IExtensionHost {
549
549
event . fire ( line + '\n' ) ;
550
550
}
551
551
}
552
- } ) ;
552
+ } , undefined , store ) ;
553
553
554
554
return event ;
555
555
}
0 commit comments