You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, a panicking goroutine's stack trace ends at the go line:
The GODEBUG=tracebackancestors environment variable addresses this. Presumably, it has some kind of runtime cost that prevents it from being set by default - hence, this proposal to have it apply only during testing.
Having this on by default would improve the debugging experience for all users who need to work with goroutines.
The text was updated successfully, but these errors were encountered:
making code behave differently in tests than in normal operation sounds like a source for confusion. Like many testing functionality like race detection and coverage, it should be opt in, like it is now with GODEBUG.
This would almost certainly break existing users who parse stack traces.
The information would be sometimes useful and sometimes not. Many servers can have hundreds or thousands of goroutines that all started at the same place, such as the server's call to Accept. Dumping the stack trace of the Accept call hundreds of times, even if only in a test, serves nobody.
Since we already have a way to do this, I'm going to close this proposal. Sorry.
Proposal Details
By default, a panicking goroutine's stack trace ends at the
go
line:The
GODEBUG=tracebackancestors
environment variable addresses this. Presumably, it has some kind of runtime cost that prevents it from being set by default - hence, this proposal to have it apply only during testing.Having this on by default would improve the debugging experience for all users who need to work with goroutines.
The text was updated successfully, but these errors were encountered: