This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Debugger does not respect timer #9333
Closed
Description
This was originally #9319, but I've reduced the case down more.
Note: this is happening with node 0.10.31 and above.
Given code example.js
:
setInterval(function() {
console.log(1)
debugger
console.log(2);
}, 10);
ok I enter into debugger now:
$ node debug ./example.js
< Debugger listening on port 5858
connecting to port 5858... ok
break in example.js:1
> 1 setInterval(function() {
2 console.log(1)
3 debugger
debug> c
< 1
break in example.js:3
1 setInterval(function() {
2 console.log(1)
> 3 debugger
4 console.log(2);
5 }, 10);
debug> c //*********now wait 1min before you hit enter******//
< 2 //********now it gets stuck here for 1min before it moves onto the next break point****//
My assumption is that the break points are messing up node's timer some how.
This may seem like a small issue in the debugger, but it's causing huge pains for Protractor users because all of protractor's code (which is using webdriver) is in a giant setInterval.
reference:
angular/protractor#1890
angular/protractor#1899
angular/protractor#1822
angular/protractor#1890
angular/protractor#1893
and the only workaround for that right now is to downgrade node to 0.10.30 or lower.
Thanks!