Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"stack frame not found" #455

Closed
roblourens opened this issue May 2, 2020 · 2 comments
Closed

"stack frame not found" #455

roblourens opened this issue May 2, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug upstream verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

  • Debug normally
  • Hit a breakpoint
  • Click the second stack frame item
  • Can't see variables past the first frame

I don't see anything obvious in the log?

image

vscode-debugadapter-7.json.txt

@connor4312
Copy link
Member

connor4312 commented May 4, 2020

@isidorn I'm seeing something interesting here, the case is:

  1. Rob pauses on a breakpoint here: https://github.com/microsoft/vscode/blob/d9b9744ce7ef30abc63ab456de10bc5035b3d291/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts#L104
  2. VS Code requests a stacktrace. For the"fire" frame inside event dispatching code that he has in the screenshot above, js-debug responds with stacktrace id A (in the log, 692)
  3. Rob steps over a statement.
  4. We continue and stop again, as expected. VS Code requests a new stacktrace.
  5. VS Code requests a new stacktrace for this location. This time, the "fire" frame has a frame id B (in the log, 722)--for us stacktraces are ephemeral and we just auto-increment for each new set of data from CDP.
  6. Rob clicks on the "fire" frame, but it sends a request with id A that we no longer have 🐛

Repro case, seems somewhat inconsistent but it happens eventually when stepping over a++:

function foo() {
  let a = 0;
  // paused in here, you can see the parent stack. Now, step over...
  debugger;

  // somewhere here, clicking on the parent frame results in the error:
  a++;
  a++;
  a++;
}

foo();

@connor4312 connor4312 added this to the May 2020 milestone May 4, 2020
@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug upstream labels May 4, 2020
@isidorn
Copy link

isidorn commented May 5, 2020

@roblourens thanks for filling great issues
@connor4312 thanks for making good repro steps

The issues was the following: we are doing delayed call stack loading which means we first fetch the top then the rest. If the rest is same as in previous step we do not fire a change event to reduce tree flashing. The issue was in our equality check for frames. We were not checking that the frameId were equal which was very much wrong.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issue identified by VS Code Team member as probable bug upstream verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants