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
Philippe Hardardt
October 19, 2019
Programming
0
38
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
79
Do ASP.NET para o Rails - as melhores partes
peagha
2
260
Other Decks in Programming
See All in Programming
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
780
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
960
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
180
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
130
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
200
今、知っておきたい! 生成AIエージェントの世界
elith
3
360
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
Let's learn code review
riofujimon
1
220
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
930
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
170
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Building Your Own Lightsaber
phodgson
99
5.7k
It's Worth the Effort
3n
180
27k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Music & Morning Musume
bryan
41
5.6k
The Invisible Customer
myddelton
114
12k
The Pragmatic Product Professional
lauravandoore
25
5.8k
A Modern Web Designer's Workflow
chriscoyier
689
190k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
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