File tree Expand file tree Collapse file tree
vs/workbench/services/extensions/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,13 +103,15 @@ if (!process.env['VSCODE_ALLOW_IO']) {
103103 process . __defineGetter__ ( 'stdin' , function ( ) { return writable ; } ) ;
104104}
105105
106- // Handle uncaught exceptions
107- process . on ( 'uncaughtException' , function ( err ) {
108- console . error ( 'Uncaught Exception: ' , err . toString ( ) ) ;
109- if ( err . stack ) {
110- console . error ( err . stack ) ;
111- }
112- } ) ;
106+ if ( ! process . env [ 'VSCODE_HANDLES_UNCAUGHT_ERRORS' ] ) {
107+ // Handle uncaught exceptions
108+ process . on ( 'uncaughtException' , function ( err ) {
109+ console . error ( 'Uncaught Exception: ' , err . toString ( ) ) ;
110+ if ( err . stack ) {
111+ console . error ( err . stack ) ;
112+ }
113+ } ) ;
114+ }
113115
114116// Kill oneself if one's parent dies. Much drama.
115117if ( process . env [ 'VSCODE_PARENT_PID' ] ) {
@@ -138,4 +140,4 @@ if (typeof crashReporterOptionsRaw === 'string') {
138140 }
139141}
140142
141- require ( './bootstrap-amd' ) . bootstrap ( process . env [ 'AMD_ENTRYPOINT' ] ) ;
143+ require ( './bootstrap-amd' ) . bootstrap ( process . env [ 'AMD_ENTRYPOINT' ] ) ;
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ export class ExtensionHostProcessWorker {
141141 VERBOSE_LOGGING : true ,
142142 VSCODE_WINDOW_ID : String ( this . _windowService . getCurrentWindowId ( ) ) ,
143143 VSCODE_IPC_HOOK_EXTHOST : pipeName ,
144+ VSCODE_HANDLES_UNCAUGHT_ERRORS : true ,
144145 ELECTRON_NO_ASAR : '1'
145146 } ) ,
146147 // We only detach the extension host on windows. Linux and Mac orphan by default
You can’t perform that action at this time.
0 commit comments