Debugger Options - splunk/vscode-extension-splunk GitHub Wiki

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: the 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: the 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 Visual Studio 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.  For production, either remove debug code or disable debugging options. 
* Default: True
⚠️ **GitHub.com Fallback** ⚠️