Pug pe viii - luciano rodrigues - debugger
23
-
Upload
pugpe -
Category
Technology
-
view
975 -
download
0
description
Palestra ministrada por Luciano Rodrigues com o tema Pyhon Debugger no VIII Encontro do PUG-PE em 16/10/2010.
Transcript of Pug pe viii - luciano rodrigues - debugger
![Page 1: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/1.jpg)
![Page 2: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/2.jpg)
![Page 3: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/3.jpg)
![Page 4: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/4.jpg)
![Page 5: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/5.jpg)
![Page 6: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/6.jpg)
![Page 7: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/7.jpg)
![Page 8: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/8.jpg)
![Page 9: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/9.jpg)
![Page 10: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/10.jpg)
# python –m pdb scritp.py
![Page 11: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/11.jpg)
>>> import script
>>> import pdb
>>> pdb.run(‘script.funcao()’)
![Page 12: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/12.jpg)
import pdb
...
pdb.set_trace()
![Page 13: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/13.jpg)
# Após o erro e dentro do interpretador
>>> import pdb
>>> pdb.pm()
![Page 14: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/14.jpg)
![Page 15: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/15.jpg)
• w(here)
• l(ist)
• u(p)
• d(own)
![Page 16: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/16.jpg)
• a(rgs)
• p/pp/print
• !
![Page 17: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/17.jpg)
• s(tep)
• n(ext)
• until
• return
![Page 18: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/18.jpg)
• break
– break numero_da_linha
– break
– break nome_arquivo:numero_da_linha
• continue
• disable
• enable
• clear
![Page 19: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/19.jpg)
• tbreak
• condition
• ignore
• comands
• jump
• alias / unalias
![Page 20: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/20.jpg)
• PyMOTW - http://www.doughellmann.com/ PyMOTW/pdb/
• WinPdb – www.winpdb.org
• Pydb - http://bashdb.sourceforge.net/pydb/
• Pydbgr - http://code.google.com/p/pydbgr/
![Page 21: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/21.jpg)
![Page 22: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/22.jpg)
![Page 23: Pug pe viii - luciano rodrigues - debugger](https://reader033.fdocument.pub/reader033/viewer/2022052413/55981fd41a28ab9c648b466c/html5/thumbnails/23.jpg)