Skip to content

Commit

Permalink
Fix debugger late attach, suspend=n. (dotnet#45834)
Browse files Browse the repository at this point in the history
Runtime workaround fix for incorrect VM resume when suspend policy none is in use. Real fix is in debugger-libs, mono/debugger-libs#264 but until that lands in VS installer (and tooling has been upgraded to VS2019) this workaround will prevent the error to be propagated back to client and VM will make sure the correct suspend state is maintained.

Fix also makes sure logging done within debugger engine/agent is not directly send to stdout/stderr on platforms where there is no console (or alternative console).

This is done to prevent scenarios where stdout/stderr has been redirected to for example the debug client, but logging into the same streams as part of debugger agent implementation will trigger new messages to redirect, flooding the message queue and suspending/resuming the VM for each message. This PR makes sure it is possible to get all logging done in debugger agent/engine (not just debug logging) into an alternative log implementation on platforms needing it.

Co-authored-by: lateralusX <[email protected]>
  • Loading branch information
monojenkins and lateralusX authored Dec 10, 2020
1 parent cfa7a19 commit 8dec5ad
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 199 deletions.
Loading

0 comments on commit 8dec5ad

Please sign in to comment.