Skip to content

Fix stack trace for Trace.Fail and Debug.Fail#15103

Merged
nohwnd merged 1 commit intomicrosoft:mainfrom
nohwnd:fix-stack-trace-for-trace-fail-debug-fail
Jun 16, 2025
Merged

Fix stack trace for Trace.Fail and Debug.Fail#15103
nohwnd merged 1 commit intomicrosoft:mainfrom
nohwnd:fix-stack-trace-for-trace-fail-debug-fail

Conversation

@nohwnd
Copy link
Copy Markdown
Member

@nohwnd nohwnd commented Jun 16, 2025

Description

I see the stack trace included always, but the stack trace is incorrect, the way we count the frames to include was wrong, and we did not cut the stack trace to start with debug fail and the test method.

The first highlight is extra, the next highlight shows that the originating method is there:

image

Replace #15092

Fix #5160

@nohwnd nohwnd merged commit 7164ea6 into microsoft:main Jun 16, 2025
8 checks passed
This was referenced Oct 2, 2025
This was referenced Apr 2, 2026
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.

Exception thrown in TestHostTraceListener.Fail does not include stack trace or method name

2 participants