mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
trace the stack when process.exit is called from an extension
This commit is contained in:
@@ -56,7 +56,10 @@ export interface IInitData {
|
||||
}
|
||||
|
||||
const nativeExit = process.exit;
|
||||
process.exit = () => { console.warn('An extension called process.exit() and this was prevented'); };
|
||||
process.exit = () => {
|
||||
const err = new Error('An extension called process.exit() and this was prevented.');
|
||||
console.warn((<any>err).stack);
|
||||
};
|
||||
export function exit(code?: number) {
|
||||
nativeExit(code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user