Created
March 14, 2014 17:52
-
-
Save forkata/9553057 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# stolen from http://blog.charlescy.com/blog/2013/08/26/pry-command-cheatsheet/ | |
# who took it from Conrad Irwin's railsconf 2013 talk http://youtu.be/jDXsEzOHb2M | |
ls <Object> -- Show all of the available methods that can be called by an object | |
_ -- Last output | |
? <Object> -- Shows more information (doc) about an object, or method | |
cat <File> -- Display the content of a file | |
_file_ -- Represent the last file Pry touched | |
wtf? -- Print the stack trace, same as _ex_.backtrace | |
$ -- Show source, shortcut for show-source | |
edit <Method> -- Open file in $EDITOR, change file are auto reloaded | |
<ctrl+r> -- Search history | |
_out_ -- Array of all outputs values, also _in_ | |
cd <var> -- Step into an object, change the value of self | |
cd .. -- Take out of a level | |
binding.pry -- Breakpoint | |
edit --ex -- Edit the file where the last exception was thrown | |
.<Shell> -- Runs the <Shell> command | |
whereami -- Print the context where the debugger is stopped | |
; -- Would mute the return output by Ruby | |
play -l -- Execute the line in the current debugging context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment