This command halts the test execution and provides users with a REPL interface where they can type
any of the available Nightwatch commands and the command will be executed in the running browser
in real-time.

This can be used to debug why a certain command in not working as expected, find the correct
locators for your assertions or just play around with the available Nightwatch commands.

Usage

Parameters

Name Type description
config object

Config options for the REPL interface.

callback
Optional
function

Optional callback function to be called when the command finishes.

Example

// async function is required while using the debug
// command to get the correct result as output.
this.demoTest = async function (browser) {
  browser.debug();

  // with no auto-complete
  browser.debug({preview: false});

  // with a timeout of 6000 ms (time for which the interface
  // would wait for a result).
  browser.debug({timeout: 6000})
};