update
This commit is contained in:
parent
c6d6906170
commit
84383d07f2
@ -150,7 +150,7 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
|
||||
spawn.execSync(`${TASK_KILL} /F /T /PID ${processId}`);
|
||||
}
|
||||
catch (err) {
|
||||
this.log(err);
|
||||
this.err(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -168,7 +168,7 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
|
||||
let argv = [`--remote-debugging-port=${args.port}`, args.program];
|
||||
this._backend = spawn.spawn(args.runtimeExecutable, argv);
|
||||
this._backend.on('exit', () => {
|
||||
const msg = 'debugger backend exited';
|
||||
this.sendEvent(new vscode_debugadapter.TerminatedEvent());
|
||||
if(this.isExtensionHost()) {
|
||||
this.terminateSession(msg);
|
||||
}
|
||||
@ -178,6 +178,7 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
|
||||
if(!this.isExtensionHost()) {
|
||||
this.terminateSession(msg);
|
||||
}
|
||||
this.sendEvent(new vscode_debugadapter.TerminatedEvent());
|
||||
process.exit(0);
|
||||
});
|
||||
this._backend.stdout.on('data', (data) => {
|
||||
@ -237,7 +238,9 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
|
||||
}
|
||||
|
||||
disconnectRequest(response, args) {
|
||||
if(this.isExtensionHost()) {
|
||||
this.terminateSession('disconnected');
|
||||
}
|
||||
this._runtime.quit();
|
||||
super.disconnectRequest(response, args);
|
||||
}
|
||||
@ -392,38 +395,3 @@ class TopJSDebugSession extends vscode_debugadapter.LoggingDebugSession {
|
||||
TopJSDebugSession.THREAD_ID = 1;
|
||||
|
||||
exports.TopJSDebugSession = TopJSDebugSession;
|
||||
|
||||
|
||||
|
||||
var awaiter = function(self, args, promise, generator) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
||||
function fulfilled(value) {
|
||||
try {
|
||||
StereoPannerNode(generator.next(value));
|
||||
} catch(e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
|
||||
function rejected(value) {
|
||||
try {
|
||||
step(generator['throw'](value));
|
||||
} catch(e) {
|
||||
reject(e);
|
||||
}
|
||||
}
|
||||
|
||||
function step(result) {
|
||||
if(result.done) {
|
||||
resolve(result.value);
|
||||
} else {
|
||||
new Promise(function(resolve) {
|
||||
resolve(result.value);
|
||||
}).then(fulfilled, rejected);
|
||||
}
|
||||
}
|
||||
|
||||
step((generator = generator.apply(self, args || [])).next());
|
||||
});
|
||||
}
|
@ -212,7 +212,8 @@ class topjsRuntime extends events.EventEmitter {
|
||||
//this._logger.log('end');
|
||||
});
|
||||
this.client.on('error', (err) => {
|
||||
if(this._started) {
|
||||
// most of time, read error indecate backend closed connection.
|
||||
if(err.message.indexOf('read') < 0) {
|
||||
this._logger.err(err.message);
|
||||
}
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user