Top  Previous  Next


The PDEBUG command runs the phantom debugger.





PDEBUG {command}





commandis the command to be executed by the phantom process.


usernois the QM user number of the phantom process to be debugged.



The PDEBUG command allows debugging of a QMBasic program in a phantom or QMClient process using the same debugger interface as for foreground processes.


The first form of the PDEBUG command waits for a phantom or QMClient process running in the same account and as the same user name to attempt to enter the debugger. At that point, the process executing the PDEBUG command will enter the QMBasic debugger and can use this in the usual way except that it is not possible to view the application screen because a phantom process is not associated with a terminal device.


The phantom process to be debugged may be started separately or by use of the command option to the PDEBUG command.


The second form of the PDEBUG command forces the phantom process with the specified user number into debug mode. It is equivalent to the application executing a QMBasic DEBUG statement. Actual entry to the phantom debugger will occur when the process next executes a statement in a program compiled in debug mode.


If a phantom process attempts to enter the debugger but there is no PDEBUG command waiting to trap this situation, the phantom process will normally be terminated. Alternatively, this situation can be trapped as a SYS.PROGRAM.NO_PDEBUG exception in the phantom process. This exception is only thrown if there is a handler to catch it.