summaryrefslogtreecommitdiff
path: root/topics/pudb
diff options
context:
space:
mode:
Diffstat (limited to 'topics/pudb')
-rw-r--r--topics/pudb/pytest-pudb.gmi7
-rw-r--r--topics/pudb/using-pudb.gmi21
2 files changed, 28 insertions, 0 deletions
diff --git a/topics/pudb/pytest-pudb.gmi b/topics/pudb/pytest-pudb.gmi
new file mode 100644
index 0000000..5a979c0
--- /dev/null
+++ b/topics/pudb/pytest-pudb.gmi
@@ -0,0 +1,7 @@
+# Using pudb with pytest
+
+```
+pytest --pdbcls pudb.debugger:Debugger --pdb --capture=no
+```
+
+=> https://documen.tician.de/pudb/starting.html?highlight=pytest#usage-with-pytest
diff --git a/topics/pudb/using-pudb.gmi b/topics/pudb/using-pudb.gmi
new file mode 100644
index 0000000..877a700
--- /dev/null
+++ b/topics/pudb/using-pudb.gmi
@@ -0,0 +1,21 @@
+# Using pudb
+
+## Setting Breakpoints
+
+You can add the following line anywhere in your code to start a pudb breakpoint:
+
+```
+import pudb; pudb.set_trace()
+```
+
+You can also press `b` in pudb to add a breakpoint with a keyboard shortcut.
+
+## pdb and pudb API similarity
+
+The standard pdb docs should work for pudb with one small exception.
+
+> At the programming language level, PuDB displays the same interface
+> as Python’s built-in pdb module. Just replace pdb with pudb. (One
+> exception: run is called runstatement.)
+
+=> https://docs.python.org/3/library/pdb.html?highlight=pdb#module-pdb