-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
System.Diagnostics.Debugger.Break() causes System.Runtime.InteropServices.COMException #97261
Comments
Tagging subscribers to this area: @thaystg Issue DetailsDescriptionCalling Reproduction StepsCall Expected behaviorDebugger should stop as if it hit a breakpoint when Debugger.Break() is called Actual behaviorA Regression?This is a regression in .NET 9 main builds Known WorkaroundsN/A ConfigurationAll OS's and Architectures Other information
runtime/src/coreclr/debug/ee/controller.cpp Lines 8332 to 8333 in bd84a96
The
|
Tagging subscribers to this area: @tommcdon Issue DetailsDescriptionCalling Reproduction StepsCall Expected behaviorDebugger should stop as if it hit a breakpoint when Debugger.Break() is called Actual behaviorA Regression?This is a regression in .NET 9 main builds Known WorkaroundsN/A ConfigurationAll OS's and Architectures Other information
runtime/src/coreclr/debug/ee/controller.cpp Lines 8332 to 8333 in bd84a96
The
|
@AaronRobinsonMSFT @jkotas Do you know if |
I think we might want to revert #96099 for now. /cc @huoyaoyuan |
Can we add some test to exercise patterns used by debugger? |
Yep. We'll do that in the updated PR. |
Description
Calling
System.Diagnostics.Debugger.Break()
should cause the debugger to stop by triggering a user breakpoint at the location where the function was called.Reproduction Steps
Call
Debugger.Break()
in small C# console appExpected behavior
Debugger should stop as if it hit a breakpoint when Debugger.Break() is called
Actual behavior
A
System.Runtime.InteropServices.COMException
is triggeredRegression?
This is a regression in .NET 9 main builds
Known Workarounds
N/A
Configuration
All OS's and Architectures
Other information
DebuggerUserBreakpoint::IsFrameInDebuggerNamespace
is checking the Namespace and the Class by converting a UTF8 string into a Unicode string:runtime/src/coreclr/debug/ee/controller.cpp
Lines 8332 to 8333 in bd84a96
The
MAKE_WIDEPTR_FROMUTF8
macro usesConvertUtf8_Unicode
which was re-written in #96099. The original implementation seemed to accept zero-length strings, but the new one will now throw an exception. I am not sure ifConvertUtf8_Unicode
intends to support zero length strings (if yes we should consider updating the function). We can work around this particular issue by avoiding converting zero-length strings inDebuggerUserBreakpoint::IsFrameInDebuggerNamespace
.The text was updated successfully, but these errors were encountered: