diff options
author | jgart | 2021-12-21 03:22:21 -0500 |
---|---|---|
committer | jgart | 2021-12-21 03:22:21 -0500 |
commit | 8c14607dbd48af1beaed057c165a2c21230d923e (patch) | |
tree | 3eb94fc09892b94ab985f28dffa44ac96d3f066b /topics | |
parent | 125a4fb150e1209dc89ed1ea4f4026965da7524f (diff) | |
download | gn-gemtext-8c14607dbd48af1beaed057c165a2c21230d923e.tar.gz |
add topic on using pudb
Diffstat (limited to 'topics')
-rw-r--r-- | topics/pudb/using-pudb.gmi | 21 |
1 files changed, 21 insertions, 0 deletions
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 |