Debugging Tips and Tricks

  • 기본과 응용
  • 2016-08-14 (일요일) 16:05 - 16:30
  • 영어
  • 103
  • 촬영, 녹화가 가능합니다.

슬라이드

https://slides.com/invisibleroads/debugging-tips

발표 동영상

https://youtu.be/xDz8WVO_wjE

PDF

https://github.com/pythonkr/pyconapac-2016-files/raw/master/20160814-103-41-RoyHyunjinHan.pdf

설명

Debugging Tips and Tricks

Presentation slides

https://slides.com/invisibleroads/debugging-tips


Demonstration video

https://youtu.be/yZ3Ypil6sJk


Extended notes

https://github.com/crosscompute/crosscompute-tutorials/tree/master/debugging-tips#python-debugging-tips-and-tricks 


1. Examine exception while running interpreter

jupyter notebook
    debug

2. Pinpoint variables in scope

import IPython; IPython.embed()
    whos

 3. Step through execution at breakpoint

import pudb; pudb.set_trace()

4. Drop into debugger without modifying code

pudb -- xyz.py arg1 arg2 

5. Trace on CTRL-C

import pudb; pudb.set_interrupt_handler()

6. Debug threads or Docker containers

import wdb; wdb.set_trace()

7. Use namespaced logger with rsyslog server

logging.getLogger(__name__)

8. Debug tests

pip install pdbpp; py.test --pdb

댓글

blog comments powered by Disqus

후원사 목록

키스톤

다이아몬드

플래티넘

골드

스타트업

실버

미디어