Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Debugando com Pry
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Philippe Hardardt
October 19, 2019
Programming
0
51
Debugando com Pry
https://www.youtube.com/watch?v=s_Hy_RYUCtU
https://github.com/peagha/pry_game_of_life
Philippe Hardardt
October 19, 2019
Tweet
Share
More Decks by Philippe Hardardt
See All by Philippe Hardardt
Rack - A interface por trás dos frameworks web em Ruby
peagha
1
88
Do ASP.NET para o Rails - as melhores partes
peagha
2
350
Other Decks in Programming
See All in Programming
Ruby and LLM Ecosystem 2nd
koic
1
960
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
680
How to stabilize UI tests using XCTest
akkeylab
0
130
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
400
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
190
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
AHC061解説
shun_pi
0
390
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
680
Claude Code Skill入門
mayahoney
0
400
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
470
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
140
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
140
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
A Soul's Torment
seathinner
5
2.5k
Code Reviewing Like a Champion
maltzj
528
40k
Context Engineering - Making Every Token Count
addyosmani
9
760
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
My Coaching Mixtape
mlcsv
0
76
What's in a price? How to price your products and services
michaelherold
247
13k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Docker and Python
trallard
47
3.8k
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Documentation Writing (for coders)
carmenintech
77
5.3k
Transcript
Debugando com Pry
Oi, eu sou o Phil
None
Mas antes…
Jogo da vida de Conway
None
Implementado em Ruby
[código ao vivo] https://github.com/peagha/ pry_game_of_life
Recapitulando
binding.pry if true pry: criar um breakpoint quando o código
atingir um determinado estado
whereami pry: ver o código onde se encontra o breakpoint
atual
edit pry: edit Classe#método ou edit Classe Editar o código
fonte de um arquivo e recarregar o mesmo
show-source pry: show-source Classe#método ou show-source Classe Ver o o
fonte de um método ou classe
disable-pry Desliga o pry até o fim da execução do
programa
up / down pry-byebug: up: subir para o método que
chama o atual down: voltar para o método atual
$variaveis_globais Ruby: variáveis que você pode acessar em qualquer lugar
def inspect Ruby: definir o método que será usado pelo
Pry ou IRB para apresentar um objeto
Ferramental de debug
Leiam os docs
Obrigado! peagha @philHenri