]> granicus.if.org Git - icinga2/blobdiff - doc/20-script-debugger.md
ITL by_ssh add -E parameter
[icinga2] / doc / 20-script-debugger.md
index e28f69d3f875373458109ff800a8c489ce24c659..375eda067b369c5a8ff142082099373376095b0e 100644 (file)
@@ -1,22 +1,26 @@
-# <a id="script-debugger"></a> Script Debugger
+# Script Debugger <a id="script-debugger"></a>
 
 You can run the Icinga 2 daemon with the `-X` (`--script-debugger`)
 parameter to enable the script debugger:
 
     # icinga2 daemon -X
 
-When an exception occurs or the [debugger](18-language-reference.md#breakpoints)
-keyword is encountered in a user script Icinga 2 launches a console that
+When an exception occurs or the [debugger](17-language-reference.md#breakpoints)
+keyword is encountered in a user script, Icinga 2 launches a console that
 allows the user to debug the script.
 
-Here is a list of common error which can be diagnosed with the script debugger:
+You can also attach the script debugger to the [configuration validation](11-cli-commands.md#config-validation):
 
-* Configuration errors (apply)
-* Errors in user-defined functions
+    # icinga2 daemon -C -X
+
+Here is a list of common errors which can be diagnosed with the script debugger:
+
+* Configuration errors e.g. [apply rules](03-monitoring-basics.md#using-apply)
+* Errors in user-defined [functions](17-language-reference.md#functions)
 
-## <a id="script-debugger-config-errors"></a> Debugging Configuration Errors
+## Debugging Configuration Errors <a id="script-debugger-config-errors"></a>
 
-The following example illustrates the problem of a service [apply rule](3-monitoring-basics.md#using-apply-for)
+The following example illustrates the problem of a service [apply rule](03-monitoring-basics.md#using-apply-for)
 which expects a dictionary value for `config`, but the host custom attribute only
 provides a string value:
 
@@ -76,7 +80,7 @@ you can inspect attributes of the service object:
 
 Additionally you can view the service object attributes by printing the value of `this`.
 
-## <a id="script-debugger-breakpoints"></a> Using Breakpoints
+## Using Breakpoints <a id="script-debugger-breakpoints"></a>
 
 In order to halt execution in a script you can use the `debugger` keyword: