Extended Commands

DBG Console Command

Debug Task

Format

DBG [process-id]

Where:

process-id

Process number of the task to be connected to for debugging.

Description

The DBG command provides a built in text mode debugger that allows the developer to monitor and control other PxPlus tasks in the system. To use the debugger, the user must first identify and select the process to debug. The process ID can be provided on the Command line, or the Connect command can be used to establish the connection.

The debug commands are listed below.

Command

Description

Connect procid

Connect to process.

Disconnect

Disconnect from process.

Tasks [ * ]

List known processes. If you specify an asterisk on the request, all tasks along with their current program will be displayed.

Halt

Halt/suspend the process.

Go

Resume the process.

Execute xxxx

Execute command within process (e.g. E Goto 10, E X$="newvalue").

List [ from [ to ]]

List statements (optional from/to line numbers).

Kill

Terminate/kill the process. System asks to confirm this process before proceeding.

Print xxxx

Evaluate and show xxxx from process (e.g. P X$).

Files

Show a list of all open files and their current state.

Stack

Shows the current CALL/GOSUB/FOR/WHILE stack.

Where

Show current program and line number.

. xxx (period)

The "dot" command can be used to step through a program either a single statement at a time or until the condition specified in xxx occurs:

xxx

Step Until Condition

Program

Till program change

Around

Around next GOSUB/CALL/etc.

Out

Out of current program level

nnn

nnn Instructions are executed

Quit

Disconnects from the current process (if any) and exits the debugger.

?

Displays help on the debug commands.

All commands accept the first character only, as in "P X$" to print X$.

The DBG processor remembers the last 100 commands, and they can be recalled using the Up/Down arrows.

(The DBG command was added in PxPlus v8.30.)