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
39
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
290
Other Decks in Programming
See All in Programming
CSC509 Lecture 09
javiergs
PRO
0
140
Better Code Design in PHP
afilina
PRO
0
130
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
subpath importsで始めるモック生活
10tera
0
320
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
Ethereum_.pdf
nekomatu
0
470
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1k
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
初めてDefinitelyTypedにPRを出した話
syumai
0
420
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.3k
イベント駆動で成長して委員会
happymana
1
340
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
260
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
The Language of Interfaces
destraynor
154
24k
Building Adaptive Systems
keathley
38
2.3k
Building Your Own Lightsaber
phodgson
103
6.1k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Thoughts on Productivity
jonyablonski
67
4.3k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
We Have a Design System, Now What?
morganepeng
50
7.2k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Embracing the Ebb and Flow
colly
84
4.5k
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