liveBook · Manning

Non-blocking breakpoint

As explained in Troubleshooting Java, Second Edition

A non-blocking breakpoint is a breakpoint configuration that records messages or values when reached without pausing program execution.

A non-blocking breakpoint records a message, variable value, or execution stack trace when reached without pausing program execution. It reveals runtime behavior without changing the code or interrupting its flow. section 3.2

Use it to investigate behavior that changes when execution is interrupted:

  • Observe values at a specific line while a process continues running. section 3.2
  • Capture execution stack traces to understand how the line was reached. section 3.2
  • Apply the technique to lengthy processes that produce extensive logs without adding log instructions. section 3.2

Investigating inconsistent invoice output

A long-running settlement and invoice process produced faulty documents inconsistently: isolated runs succeeded, while full runs sometimes failed. A non-blocking breakpoint logged the digits variable and stack trace; the observed value was an empty list ([]), providing evidence about the runtime path. section 3.2

Figure 3.8 Conditional breakpoint advanced configuration. In addition to specifying a condition for the breakpoint, you can instruct the debugger to not suspend the execution for the given breakpoint. Instead, you can simply log the data you need to understand your case.

Configure a conditional breakpoint to log needed data while leaving execution unsuspended. section 3.2

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains definition, conditional configuration, variable logging, and stack-trace interpretation without detailing debugger internals.
Examples
Demonstrates empty-list observation during inconsistent settlement and invoice generation.
What it assumes
Assumes familiarity with breakpoints and introduces conditional, non-pausing debugger configuration.
What you can do after
Diagnose/debug with it by capturing runtime values and execution paths during uninterrupted processes.
How it connects
Connects conditional breakpoints, debuggers, execution stack traces, and logging.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.