comet.debug¶
The comet.debug module provides facilities for setting up debugging sessions for actions executed by priint:comet.
For more information refer to Debugging
Methods¶
- comet.debug.startServer()¶
Start the debugger server on the configured port (default is 5678).
Once the server has been started it cannot be stopped for this session.
- Return type:
None
- Raises:
When the server could not be started. Make sure pydev is installed and the port configured correctly.
For more information see Prerequisites.
- Available:
InDesign® comet_pdf® Illustrator®
- comet.debug.isServerStarted()¶
Determine whether the debugger server is currently running.
- Returns:
Whether the debugger server is currently running.
- Return type:
- Available:
InDesign® comet_pdf® Illustrator®
- comet.debug.isClientConnected()¶
Determine whether a client is currently connected to the debugger server.
- Returns:
Whether the debugger server currently has a client connection.
- Return type:
- Available:
InDesign® comet_pdf® Illustrator®
- comet.debug.getServerPort()¶
Get the configured port for the debugger server.
- Returns:
The configured port.
- Return type:
- Available:
InDesign® comet_pdf® Illustrator®
- comet.debug.setServerPort(port)¶
Set the port for the debugger server.
This function can only be called when the debugger server has not been started for this session yet.
Calling this function when the server is already running will raise a CometError
- Parameters:
port (int) – The new port.
- Raises:
TypeError – When parameter types are invalid.
ValueError – When parameter port is <= 0.
CometError – When the debugger server is already running.
- Available:
InDesign® comet_pdf® Illustrator®
- comet.debug.breakpoint(startServer=False, waitForClient=True)¶
Cause the script execution to halt, yielding control to the debugger client - if one is attached.
- Parameters:
startServer (bool) –
True
: When the debugger server has not yet started,this starts the debugger server on the configured port (default 5678).
False
: When the debugger server has not yet started,do not start it and continue script execution.
This parameter has no effect when the debugger server has already been launched.
waitForClient (bool) –
True
: When no debugger client has attached yet,halt script execution and wait indefinitely for a client to attach.
False
: When no debugger client has attached yet, do notwait one for attach and continue script execution.
This parameter has no effect when a client has already been attached.
- Return type:
None
- Raises:
TypeError – When parameter types are invalid.
- Available:
InDesign® comet_pdf® Illustrator®
- comet.debug.waitForClient()¶
Halt script execution and wait for a debugger client to attach.
When the debugger server is not running, this function does nothing.
- Return type:
None
- Available:
InDesign® comet_pdf® Illustrator®