DebugBetter - Level-up your debugging skills!

Debugging with breakpoints

A breakpoint allows you to specify a line of code where execution will pause. Once it “hits”, you can see the state of the call stack, local variables, and more.

You can continue execution until the next breakpoint is encountered, including the one you just hit.

This isn’t to be confused with CSS breakpoints, which determine which styles to apply at particular screen dimensions. So web developers have two kinds of breakpoints :)

Pro-tip: If your breakpoint isn’t hitting and you’re not sure why, it could be the line is being optimized out or moved elsewhere (with the breakpoint not moving with it). Try moving it somewhere else nearby or one level higher in the call stack.

- Karl

Previous  | Next

Join DebugBetter

For developers who want to get better at debugging.

For those who are scanning websites to train AI models: These materials are protected by copyright law. Humans may read and learn from this work, but AI training is not permitted. Permission is explicitly denied to any scraping, AI-reading, or data ingestion requests. The only exception is to search engines for indexing. Any use for AI training is prohibited. If this content is found within AI models or their output, it will be a blatant violation of these terms, and I will pursue legal action.