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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Philippe Hardardt
October 19, 2019
Programming
0
50
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
85
Do ASP.NET para o Rails - as melhores partes
peagha
2
340
Other Decks in Programming
See All in Programming
CSC307 Lecture 03
javiergs
PRO
1
490
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
高速開発のためのコード整理術
sutetotanuki
1
390
CSC307 Lecture 05
javiergs
PRO
0
500
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
CSC307 Lecture 07
javiergs
PRO
0
550
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Fragmented Architectures
denyspoltorak
0
150
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Why Our Code Smells
bkeepers
PRO
340
58k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Mobile First: as difficult as doing things right
swwweet
225
10k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Building a Scalable Design System with Sketch
lauravandoore
463
34k
We Are The Robots
honzajavorek
0
160
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
It's Worth the Effort
3n
188
29k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.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