Skip to content

Debugger Options

JasonConger edited this page Jan 12, 2020 · 3 revisions

Several options are available to control how the debugger launches on the Splunk Enterprise side.

enable_debugging( address=0.0.0.0, port, timeout=25, updateDebugConfig=True )

  • address: Splunk Enterprise server address that can accept incoming connections while the code to debug is running.
    • Default: 0.0.0.0 (all local IPv4 addresses on the machine)
  • port: port used in conjunction with the address above.
    • Default: a randomly generated port between 5000 and 5999
  • timeout: the amount of time in seconds to wait for VS Code to attach before continuing code execution.
    • Default: 25
  • updateDebugConfig: (boolean) whether to automatically create or update the VS Code debug configuration in your Splunk configuration.
    • Default: True

Configure debugging with debug.conf

The debugger can be configured for an app by creating a new file with the name debug.conf in the $SPLUNK_HOME/etc/apps/<app_directory>/local/ directory.

debug.conf

[debug]
enabled = <boolean>
* Set whether an app allows debugging
* Enabling debugging can delay execution and introduce artificial latency.  It is recommended to either remove debug code or disable debugging options for production. 
* Default: true

Important: enabling debugging can delay execution and introduce artificial latency. It is recommended to either remove debug code or disable debugging options for production.

Clone this wiki locally