-
Notifications
You must be signed in to change notification settings - Fork 28k
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
Variables in local window stop stop updating their value when stepping through code quickly #30
Comments
I can not repro this. I was even holding down F5 and all was good. |
|
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? |
@isidorn, I have the same behaviour as @jel-massih. Here is the console log: |
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. 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, I confirmed that this fix works on Windows too. Thanks! |
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
![snip_20151116130725](https://cloud.githubusercontent.com/assets/1704059/11182475/068041ca-8c63-11e5-9e27-842b4943cfbe.png)
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
The text was updated successfully, but these errors were encountered: