-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start without debugging hangs after process exits #36235
Comments
This might be a long running bug of node not terminating. Though assigning to @weinand to asses this further @oliversturm as a workaround you can try using protocol: inspector in your launch.json or upgrading to the latest version of node. |
@isidorn I guess you know what you're talking about, but node seems to terminate just fine when run from the command line or with the debugger attached. I'm on node v8.4.0 at the moment. |
I updated to node v8.7.0 but the problem remains the same. |
I noticed that on the vscode side sometimes I am not getting a function fib(n) { if ((n === 1) || (n === 0)) { return 1; } else { return fib(n - 1) + fib(n - 2); } }
var t = {
hello: "adsdaddssss",
second: true,
third: 5
} // asdlkjasdlkjaslkd jasdjlasdj
// console.log('daslasdljklakdsjkljasdkjlasdkjldalkjdaskljdaskljdaskljasddlaskjdlaskjdalskjdaslkjasdljaslkdjalsjlasdjldasjldkjasldjaslkdjaslkdjlsajdlkasjdlasjdlkasjldjasldjasldjasljldaslasdljklakdsjkljasdkjlasdkjldalkjdaskljdaskljdaskljasddlaskjdlaskjdalskjdaslkjasdljaslkdjalsjlasdjldasjldkjasldjaslkdjaslkdjlsajdlkasjdlasjdlkasjldjasldjasldjasljldaslasdljklakdsjkljasdkjlasdkjldalkjdaskljdaskljdaskljasddlaskjdlaskjdalskjdaslkjasdljaslkdjalsjlasdjldasjldkjasldjaslkdjaslkdjlsajdlkasjdlasjdlkasjldjasldjasldjasljldaslasdljklakdsjkljasdkjlasdkjldalkjdaskljdaskljdaskljasddlaskjdlaskjdalskjdaslkjasdljaslkdjalsjlasdjldasjldkjasldjaslkdjaslkdjlsajdlkasjdlasjdlkasjldjasldjasldjasljldaslasdljklakdsjkljasdkjlasdkjldalkjdaskljdaskljdaskljasddlaskjdlaskjdalskjdaslkjasdljaslkdjalsjlasdjldasjldkjasldjaslkdjaslkdjlsajdlkasjdlasjdlkasjldjasldjasldjasljl')
"C:\Users\User";
console.log('/Users/isidor/Development/w/standup/fib.js');
console.log('server/test.ts');
var t = 'C:\\Users\\User';
var x1 = 9; x1 = 10;
// console.log(msg);
// https://www.google.com
// sdadsasad sdadas dsadasdsa ddassd
var text = "some text";
var t = {
hello: "asdads"
}
var o = {};
o['hello world'] = 123;
debugger;
var t = 5 / 0;
var m = [];
console.log(['hello', 'world']);
setTimeout(function () {
}, 0);
myLongString
var m = 2 / 0;
var t = "{\nisidor}"; var m = 5; console.log('hello');
let longString = new Array(10001).join('oooooo ');
longString += '<END>';
$isidor
if (true) {
let longString = 5;
console.log(longString);
}
// console.log(longString);1
console.log({ foo: "bar" });
var myObject = {
a: 1,
b: 2,
c: 3
}
setInterval(() => {
// console.log('asdadsads')
}, 500);
var myMap = new Map();
var $isidor = 5;
var keyString = "a string",
keyObj = {},
keyFunc = function () { };
// setting the values
myMap.set(keyString, "value associated with 'a string'");
myMap.set(keyObj, "value associated with keyObj");
myMap.set(keyFunc, "value associated with keyFunc");
for (var i = 0; i < 100000; i++) {
myMap.set(i, "this is entry with: " + i);
}
var text = " lots of whitespace "
var aLargeArray = []
for (var i = 0; i < 5000; i++) {
aLargeArray.push(i);
}
var myLongString = "This is a very very very long string that is from the december VSCode release nicely wrapped in the debug console for better visibility.This is a very very very long string that is from the december VSCode release nicely wrapped in the debug console for better visibility.Thi.";
console.log(myLongString)
var c = console;
var t8 = 5; |
@isidorn The problem seems easy to reproduce for me. My launch configuration is in the initial post, and I just tried whether it depends on the test - it doesn't. I can repro with this test code: const { describe, it } = require('mocha');
const assert = require('chai').assert;
describe('barg', function() {
it('argh', function() {
assert(42 === 6 * 7, 'oh noes');
});
}); I'm using mocha 4.0.1 and chai 4.2.1. Node still 8.7.0. I guess that's it... can you see the same? |
Oh well - it struck me as stupid to leave chai in there, so I changed to |
Yeah this is easy to repro - until recently, we actually couldn't detect when the Node process was finished, when a debugger was attached. When that was hooked up, I didn't fix this noDebug case. Thanks for the report. |
VSCode Version: Code 1.17.0 (be377c0, 2017-10-04T23:33:45.303Z)
OS Version: Linux x64 4.8.0-59-generic
I have this launch configuration. It was created by one of the standard templates, I just changed the final
arg
to${file}
:I select this from the popup list in the debug panel, then hit F5 - my tests run through without issues. I can see the debugger control toolbar pop up and then go away when the tests are done.
When I use Ctrl-F5 to run my tests without debugging, everything still runs through without any issues, the debug console shows the same output from my tests but not the lines starting "debugger listening" and "debugger attached" - so it looks like all is good. However, the debugger control toolbar doesn't go away when the tests are done and I have to stop the process manually by clicking the stop button in that toolbar.
I tried running the command from the console:
It runs through and ends without any trouble. I would like code to do that, too...
The text was updated successfully, but these errors were encountered: