DbugIntf unit
Unit to send commands to a debug server process.
Use dbugintf to add debug messages to your application.
The messages are not sent to standard output, but are sent to a debug server
process which collects messages from various clients and displays them
somehow on screen.
The unit is transparent in its use: it does not need initialization, it
will start the debug server by itself if it can find it: the program should
be called debugserver and should be in the PATH.
When the first debug message is sent, the unit will initialize itself.
The FCL contains a sample debug server (dbugsvr) which can be
started in advance, and which writes debug message to the console (both on
Windows and Linux). The Lazarus project contains a visual application which
displays the messages in a GUI.
The dbugintf unit relies on the SimpleIPC
mechanism to communicate with the debug server, hence it works on all
platforms that have a functional version of that unit. It also uses
TProcess to start the debug server if needed, so the
process unit should also be functional.
Procedures and functions
FreeDebugClient | procedure | |
GetDebuggingEnabled | function | Check if sending of debug messages is enabled. |
InitDebugClient | function | Initialize the debug client. |
SendBoolean | function | Send the value of a boolean variable. |
SendDateTime | function | Send the value of a TDateTime variable. |
SendDebug | function | Send a message to the debug server. |
SendDebugEx | function | Send debug message other than informational messages. |
SendDebugFmt | function | Format and send a debug message. |
SendDebugFmtEx | function | Format and send message with alternate type. |
SendInteger | function | Send the value of an integer variable. |
SendMethodEnter | function | Send method enter message. |
SendMethodExit | function | Send method exit message. |
SendPointer | function | Send the value of a pointer variable. |
SendSeparator | function | Send a separator message. |
SetDebuggingEnabled | procedure | Temporary enables or disables debugging. |
StartDebugServer | function | Start the debug server. |
Types
TDebugLevel | enumeration | Level of the message. |
TErrorLevel | type | Integer array type with error levels as integer. |
Resource strings
SEntering | resource string | String used when sending method enter message. |
SExiting | resource string | String used when sending method exit message. |
SProcessID | resource string | String used when sending identification message to the server. |
SSeparator | resource string | String used when sending a separator line. |
SServerStartFailed | resource string | String used to display an error message when the start of the debug server failed. |
Variables
DebugServerExe | variable | Name of default debug server executable. |
DefaultDebugServer | variable | Name of default debug server. |
RaiseExceptionOnSendError | variable | |
SendError | variable | Last error in the debug system. |
Topics
debugservers | topic | Writing a debug server. |
Uses
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
