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
56
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Philippe Hardardt
See All by Philippe Hardardt
Rack - A interface por trás dos frameworks web em Ruby
peagha
1
96
Do ASP.NET para o Rails - as melhores partes
peagha
2
370
Other Decks in Programming
See All in Programming
VibeCodingからAgenticWorkflowへ
starfish719
0
410
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
270
FDEが実現するAI駆動経営の現在地
gonta
2
280
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
源内ハンズオン概要編
hideg
0
170
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
440
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
660
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
490
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
900
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
240
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
170
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
470
Deep Space Network (abreviated)
tonyrice
0
250
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
390
Embracing the Ebb and Flow
colly
88
5.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Done Done
chrislema
186
16k
Designing Powerful Visuals for Engaging Learning
tmiket
1
490
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Skip the Path - Find Your Career Trail
mkilby
1
180
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
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