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

Handle invalid threads in Continue #125

Merged
merged 2 commits into from
Nov 30, 2015
Merged

Handle invalid threads in Continue #125

merged 2 commits into from
Nov 30, 2015

Conversation

wesrupert
Copy link
Contributor

VS Code is giving a thread Id of 0 when continuing from async break. Update Continue method to better handle cases where we can't get a debugged thread from the given pThread.

@msftclas
Copy link

Hi @orablu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Wes Rupert). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


_pollThread.RunOperation(() => _debuggedProcess.Continue(thread.GetDebuggedThread()));
AD7Thread thread = pThread as AD7Thread;
_pollThread.RunOperation(() => _debuggedProcess.Continue(thread != null ? thread.GetDebuggedThread() : null));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can just be thread?.GetDebuggedThread();

@chuckries
Copy link
Member

👍

@wesrupert
Copy link
Contributor Author

Thanks!

@wesrupert wesrupert closed this Nov 30, 2015
@chuckries chuckries reopened this Nov 30, 2015
@msftclas
Copy link

Hi @orablu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Wes Rupert). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

wesrupert pushed a commit that referenced this pull request Nov 30, 2015
Handle invalid threads in Continue
@wesrupert wesrupert merged commit 06b9d30 into microsoft:VSCodeRefactor Nov 30, 2015
@wesrupert wesrupert deleted the dev/addasyncbreak branch November 30, 2015 21:34
AD7Thread thread = (AD7Thread)pThread;

_pollThread.RunOperation(() => _debuggedProcess.Continue(thread.GetDebuggedThread()));
AD7Thread thread = pThread as AD7Thread;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add a note here indicating why we are doing this. Something like:
// VS Code currently has a bug where a thread isn't provided in some cases. Work
// around this by allowing null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants