Re:Some ways to get better at debugging
by memco on Wednesday August 31, 2022 @06:16PM
(#32669044)
> adding extra logging
Were that could be done without altering production code or restarting production services that don’t have any facility to change the logging levels on the fly.
Was investigating an issue today in some code that only logged that an HTTP request was made to a specific endpoint: no details on why it decided to make that request where it was making the request from, what the request is expected to do or if it succeeded. The unit test approach is the only viable option at that level; isolate as little data as possible to replay until it succeeds. But that costs a lot of time and may not be safe depending on the side-effects. Maybe knowing how to snapshot and restore system state should be on the list too?
Were that could be done without altering production code or restarting production services that don’t have any facility to change the logging levels on the fly.
Was investigating an issue today in some code that only logged that an HTTP request was made to a specific endpoint: no details on why it decided to make that request where it was making the request from, what the request is expected to do or if it succeeded. The unit test approach is the only viable option at that level; isolate as little data as possible to replay until it succeeds. But that costs a lot of time and may not be safe depending on the side-effects. Maybe knowing how to snapshot and restore system state should be on the list too?