Roy Hyunjin Han
PyCon Asia Pacific 2016
Seoul, South Korea
Examine exception while running interpreter
Pinpoint variables in scope
Step through execution at breakpoint
Examine exception while running interpreter
jupyter notebook
debug
Pinpoint variables in scope
Step through execution at breakpoint
Examine exception while running interpreter
jupyter notebook
debug
Pinpoint variables in scope
import IPython; IPython.embed()
whos
Step through execution at breakpoint
Examine exception while running interpreter
jupyter notebook
debug
Pinpoint variables in scope
import IPython; IPython.embed()
Step through execution at breakpoint
import pudb; pudb.set_trace()
Drop into debugger without modifying code
Trace on CTRL-C
Debug threads or Docker containers
Drop into debugger without modifying code
pudb -- xyz.py arg1 arg2
Trace on CTRL-C
Debug threads or Docker containers
Drop into debugger without modifying code
pudb -- xyz.py arg1 arg2
Trace on CTRL-C
import pudb; pudb.set_interrupt_handler()
Debug threads or Docker containers
Drop into debugger without modifying code
pudb -- xyz.py arg1 arg2
Trace on CTRL-C
import pudb; pudb.set_interrupt_handler()
Debug threads or Docker containers
import wdb; wdb.set_trace()
Use namespaced logger with rsyslog server
logging.getLogger(__name__)
Debug tests
pip install pdbpp; py.test --pdb
Examine exception from interpreter | jupyter notebook debug |
Pinpoint variables in scope | import IPython; IPython.embed() whos |
Set breakpoint | import pudb; pudb.set_trace() |
Run with debugger | pudb -- xyz.py arg1 arg2 |
Start debugger on CTRL-C | import pudb pudb.set_interrupt_handler() |
Trace threads | import wdb; wdb.set_trace() |
Record logs | logging.getLogger(__name__) |
Debug tests | pip install pdbpp; py.test --pdb |