Skip to content
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

Fix incorrect "stopped" event handling #181966

Closed
roblourens opened this issue May 9, 2023 · 6 comments · Fixed by #182930
Closed

Fix incorrect "stopped" event handling #181966

roblourens opened this issue May 9, 2023 · 6 comments · Fixed by #182930
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

From #181485

Need a better fix for the underlying issue at

const wholeCallStack = new Promise<void>((c, e) => {
topCallStack = thread.fetchCallStack(1).then(() => {
if (!this.schedulers.has(thread.getId())) {
this.schedulers.set(thread.getId(), new RunOnceScheduler(() => {
thread.fetchCallStack(19).then(() => {
const stale = thread.getStaleCallStack();
const current = thread.getCallStack();
let bottomOfCallStackChanged = stale.length !== current.length;
for (let i = 1; i < stale.length && !bottomOfCallStackChanged; i++) {
bottomOfCallStackChanged = !stale[i].equals(current[i]);
}
if (bottomOfCallStackChanged) {
this._onDidChangeCallStack.fire();
}
c();
});
}, 420));
}
this.schedulers.get(thread.getId())!.schedule();
this._onDidChangeCallStack.fire();
});
});

then to bring back the change from #181855

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority debug Debug viewlet, configurations, breakpoints, adapter issues labels May 9, 2023
@roblourens roblourens added this to the May 2023 milestone May 9, 2023
@roblourens roblourens self-assigned this May 9, 2023
roblourens added a commit that referenced this issue May 19, 2023
Bring back the async queue for handling debug messages, but be sure that refreshTopOfCallstack will always resolve its promises and won't make the queue stuck
Fix #181966
@roblourens
Copy link
Member Author

roblourens commented May 19, 2023

When verifying, test with one of the multi-threaded examples here (#29168) the sample dev containers are helpful for getting a debug environment for C# or C++ too.

Previous issues:

roblourens added a commit that referenced this issue May 19, 2023
Bring back the async queue for handling debug messages, but be sure that refreshTopOfCallstack will always resolve its promises and won't make the queue stuck
Fix #181966
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 19, 2023
@joyceerhl joyceerhl added the verified Verification succeeded label Jun 1, 2023
@joyceerhl
Copy link
Contributor

Still repros for me, I can't step past this line
image

@joyceerhl
Copy link
Contributor

Hm, stopped and restarted the debug session, am now able to step over that second breakpoint 🤔 I'll consider this verified for now

@roblourens
Copy link
Member Author

roblourens commented Jun 1, 2023

Not sure about that, but also all the issue reports have gone away so I think it's ok. I just tested it with C# for a bit and it's working fine for me.

@sim642
Copy link

sim642 commented Jun 14, 2023

The supposed fix doesn't really work though, it's still broken in 1.79: goblint/GobPie#60 (comment).

@roblourens
Copy link
Member Author

I'm not following the comments in the issue, can you help me understand what is still an issue in vscode? A sample that I can repro would be great

@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants