Steps to reproduce:
- Open the attached project "G16c-StackProbe-min" (or add the attached StackProbe.cs to the Main Camera in a new project)
- Open Assets/Main.unity
- Make sure the Editor is in Release code optimization (bug icon in the status bar)
- Enter Play Mode and wait about one second
- In the Console, select "Hello from StackProbe.Start" and look at the detail pane
- Select "InvalidOperationException: Thrown from StackProbe.Update" and look at the detail pane
Actual result: Neither stack trace contains a frame of the user's script. The Debug.Log trace ends at DebugLogHandler.LogFormat and the Update exception has no stack trace.
Expected result: Both stack traces contain the user's frame (StackProbe.Start at Assets/StackProbe.cs line 10, StackProbe.Update at line 17)
Reproducible with: 7000.0.0a5, 7000.0.0a12
Not reproducible with: 6000.0.84f1, 6000.3.24f1, 6000.6.7f1, 6000.7.0b7, 7000.0.0a1
Tested on: macOS 26 (Apple Silicon)
Notes:
- Not reproducible with Debug code optimization
- Reproduces with Stack Trace Logging set to ScriptOnly and Full
- Double-clicking the Debug.Log entry opens nothing
- Also in a Development Player.log, Application.logMessageReceived and Test Runner failure stack traces