aboutsummaryrefslogtreecommitdiff
path: root/lldb/docs/use/tutorials/implementing-standalone-scripts.md
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/docs/use/tutorials/implementing-standalone-scripts.md')
-rw-r--r--lldb/docs/use/tutorials/implementing-standalone-scripts.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/docs/use/tutorials/implementing-standalone-scripts.md b/lldb/docs/use/tutorials/implementing-standalone-scripts.md
index 285d2d3..b1a3441 100644
--- a/lldb/docs/use/tutorials/implementing-standalone-scripts.md
+++ b/lldb/docs/use/tutorials/implementing-standalone-scripts.md
@@ -147,3 +147,20 @@ SBFunction: id = 0x0000002e, name = main, type = main
a.out[0x714]: mov w0, #0x0 ; =0
a.out[0x718]: ret
```
+
+### Troubleshooting
+
+You can use all the usual Python tools to debug scripts, and on top of that
+you can enable LLDB's log channels. To do this in the script shown above, add
+this line right after `debugger` has been assigned:
+
+```python
+debugger.EnableLog("lldb", ["all"])
+```
+
+`lldb` `all` enables a lot of different channels, so you will probably want
+to enable only a few channels once you know what you are interested in.
+
+This API call is the equivalent of `log enable lldb all` when using LLDB
+interactively. All channels available to `log enable` can be enabled using
+`EnableLog` too. \ No newline at end of file