Class: DebuggerCommands

DebuggerCommands

new DebuggerCommands(streamopt, configopt)

Issues commands to a Perl Debugger.

Clients must wait until the "ready" event is emitted. This event signals that the Perl debugger is ready to accept commands. If commands are issued before "ready" is emitted, an error will be thrown.

The "terminated" event is emitted when the Perl program is terminated.

Parameters:
Name Type Attributes Description
stream Duplex <optional>

The stream representing the Perl debugger.

config DebuggerCommandsConfiguration <optional>
Source:

Methods

break(filename, line) → {Promise}

Issues a breakpoint.

Parameters:
Name Type Description
filename string
line int
Source:
Returns:

Whether or not the setting of the breakpoint succeeded.

Type
Promise

connect(stream)

Connects this command interface to a Perl Debugger via the stream.

Parameters:
Name Type Description
stream Duplex
Source:

continue(filenameopt, lineopt) → {Promise}

Asks the debugger to continue.

The returned Promise is not resolved if the perl program being debugged terminates.
Clients are free to dispose of the Promise if the "terminated" event is emitted. Nothing else is going to happen.

Parameters:
Name Type Attributes Description
filename string <optional>

Only required if wanting to continue to a location.

line int <optional>

Only required if wanting to continue to a location.

Source:
Returns:
  • The promise is resolved when a breakpoint is hit.
Type
Promise

on(event, handler)

Listen for events.

Parameters:
Name Type Description
event string
handler function
Source:

quit()

Asks the debugger to quit. If successful the DebuggerHost will notify about socket related events.

Source:

removeBreak(filename, line) → {Promise}

Parameters:
Name Type Description
filename string
line line
Source:
Returns:

Whether or not the removing of the breakpoint succeeded.

Type
Promise

stacktrace() → {Promise}

Source:
Returns:

Get the stacktrace.

Type
Promise

stepInto() → {Promise}

Source:
Returns:
Type
Promise

stepOut() → {Promise}

Source:
Returns:
Type
Promise

stepOver() → {Promise}

Source:
Returns:
Type
Promise

variables() → {Promise}

Source:
Returns:

Get the variables in the current lexical scope.

Type
Promise