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
45
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
82
Do ASP.NET para o Rails - as melhores partes
peagha
2
320
Other Decks in Programming
See All in Programming
Use Perl as Better Shell Script
karupanerura
0
690
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
3
2k
Datadog RUM 本番導入までの道
shinter61
1
280
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
110
Development of an App for Intuitive AI Learning - Blockly Summit 2025
teba_eleven
0
110
Effect の双対、Coeffect
yukikurage
5
1.4k
Haskell でアルゴリズムを抽象化する / 関数型言語で競技プログラミング
naoya
17
4.5k
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
510
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
3k
Using AI Tools Around Software Development
inouehi
0
1.2k
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
360
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
260
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.7k
Six Lessons from altMBA
skipperchong
28
3.8k
RailsConf 2023
tenderlove
30
1.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
123
52k
Raft: Consensus for Rubyists
vanstee
140
7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Balancing Empowerment & Direction
lara
1
300
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
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