Variables in local window stop stop updating their value when stepping through code quickly
In a node express app I have the following loop:
var msg = 'hello world'; var i = 0; while (i < 100) { msg = msg + i.toString(); i++; }
I set up the local and watch windows in the debugger so that I can see the msg variable in both.
When stepping through the loop, if I press F10 very quickly, eventually the msg variable in the locals window will stop updating. See the screenshot below

When stepping through quickly, I sometimes see a message in the watch window that says 'Exception while processing request'
This is on 0.10.0
I can not repro this. I was even holding down F5 and all was good. @stevencl do you still see this on latest and with latest node version (e.g 4.2.1)? If yes please reopen this issue.
@isidorn Yes, I still see this issue in 0.10.1 and with the latest node (4.2.2). It happens when I step through the code very quickly.
I am also able to replicate this. For me, it completly breaks the variable panel until restart of VS Code (can scroll but unable to expand any items and nothing gets updated)
@weinand can you please try reproing this? I can not repro on my mac machine.
@jel-massih if it breaks the variables pane it should be unrelated since for steven the pane seems to be fine. If you open the developer tools console via command palette do you see some exceptions once the variables pane is broken?
This looks like an exception on the node-debug side, moving to Andre
@isidorn for me the problem is easily reproducible: open the dev tools console and step through the loop by keeping F10 pressed (and auto-repeat starts). You don't need a watch for this. After some time the 'index' problem occurs but the CALL STACK continues to update (line numbers of the top frame changes). But the VARIABLES view is stuck: it doesn't update and you cannot drill down into variables.
I've debugged the problem and here is my analysis:
After some time the UI sends a 'scope' request with an invalid frame id. This can happen if node-debug already got another 'step' request which has invalidated the frames of the previous step. Since node-debug did not check for this situation sufficiently, a "Cannot read property 'index' of undefined" occurs. I've fixed this problem by returning a proper error. However, the variables UI still doesn't work because it doesn't seem to be able to recover from exceptions or proper errors returned from the 'scope' request.
Could you please try to reproduce with my steps from above and then try to fix the issue that the variables view does not recover from an exception/error returned from the 'scope' request.
Thanks for the analysis. I will look into it following your steps.
In case of an error I now set the scopes to []. This way all consectuive step attepts should recover the variables view.
Please note that I was still unable to repro this on my machine, so please verify instead of me. Thanks
@isidorn @stevencl With the latest fixes in VS Code and node-debug I'm no longer able to reproduce the problem on OS X. Steven could you please try on Windows?
Thanks, I confirmed that this fix works on Windows too. Thanks!