3 ms·
How would you set a breakpoint on the error return case?
by mseepgood 1y ago
How would you set a breakpoint on the error return case?
- bccdee 1y agoYou wouldn't. Rust's ? operator doesn't permit that either. If you need to put a breakpoint there, put a line break there.
- mseepgood 1y agoOne reason I consider Rust's approach worse than Go's.
- tubthumper8 1y agoInline breakpoint, the same way you set a breakpoint on an expression in any language
- zffr 1y agoYou set a breakpoint directly before this line, and then step forward. If you need the breakpoint to only trigger when there is an error, then you can use a conditional breakpoint that triggers when err != nil