Last active
July 14, 2022 18:49
-
-
Save mchail/ed6472565a66523a5b2237d07e30b142 to your computer and use it in GitHub Desktop.
ruby pry tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# getting context – what can this thing do? | |
show-source | |
$ Sidekiq | |
$ Sidekiq.queues= | |
ls Sidekiq | |
cd Sidekiq | |
whereami | |
ls | |
$ dump_json | |
cd .. # or `exit` | |
p Sidekiq.methods; | |
# breakpoints | |
binding.pry | |
binding.pry | |
break | |
break Sidekiq.options | |
exit | |
Sidekiq.options | |
whereami | |
break --help | |
# other stuff! | |
_ | |
hist | |
hist --help | |
_out_ | |
ctrl+r | |
edit | |
wtf? | |
$!, $@ | |
raise :hell | |
begin; raise :hell; rescue; puts $!, $@; end | |
.pryrc | |
`ls` | |
.ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment