ECMAScript® 2024 Language Specification

Draft ECMA-262 / February 15, 2024

14.16 The debugger Statement


DebuggerStatement : debugger ;

14.16.1 Runtime Semantics: Evaluation


Evaluating a DebuggerStatement may allow an implementation to cause a breakpoint when run under a debugger. If a debugger is not present or active this statement has no observable effect.

DebuggerStatement : debugger ;
  1. If an implementation-defined debugging facility is available and enabled, then
    1. Perform an implementation-defined debugging action.
    2. Return a new implementation-defined Completion Record.
  2. Else,
    1. Return empty.