Powered by QM on a Rpi server
About OpenQM
Sales and Downloads
Help and Support

KnowledgeBase 00033: Debugging Phantom Processes

Last updated: 25 Oct 2018
Applies to: All versions
Top level index       Full Index Search Tips
Previous article     Next article

This article was originally published as a Tip of the Week.

On some systems, debugging phantom processes can be awkward. The QMBasic phantom debugger makes this easy.

The PDEBUG Command

Developers use the PDEBUG command to activate the phantom debugger.

This form of the command causes the process to pause until a phantom running under the same user name in the same account executes a QMBasic DEBUG statement.
   PDEBUG command
This form of the command is a shortcut for executing a PHANTOM command and then waiting for the phantom to execute a QMBasic DEBUG statement.

Using the Debugger

When the phantom process to be debugged executes a QMBasic DEBUG statement, the process executing the PDEBUG statement enters the debugger. This operates exactly as for debugging of a foreground process except that it is not possible to view the application output screen as the process is not associated with a terminal device.

For example, if the phantom process would normally be started by typing something like

at the command prompt, simply do

If, on the other hand, the phantom is started as part of, for example, an incoming web transaction, type

from a process running in the same account as the phantom and as the same username. Then do whatever is needed to cause the web transaction to run.

In both cases, the debugger will wake up when the phantom process executes a DEBUG statement.

Process Types

Although mainly of use to debug phantom processes, the phantom debugger can also be used to debug QMClient sessions.

Related Articles


Please tell us if this article was helpful
Very     Slightly     Not at all
Email (optional)