9 ms·
How would you debug something inside of a loop (1000s of values) with a line breakpoint in your IDE? Your debugger will trigger the breakpoint every single time
by sprremix 5y ago
How would you debug something inside of a loop (1000s of values) with a line breakpoint in your IDE? Your debugger will trigger the breakpoint every single time it walks through the loop, even when everything is going fine. Now if you conditionally trigger the breakpoint inside the loop using code, it will trigger once and only if it encounters whatever error you want to catch.
Obviously you remove that debug statement from your code after you're finished debugging.
- ZeikJT 5y agoBrowsers have conditional breakpoints available in their tools/debuggers so you can write them without changing the code.