Skip to content

Instantly share code, notes, and snippets.

@amiel
Created May 14, 2012 23:43
Show Gist options
  • Save amiel/2698106 to your computer and use it in GitHub Desktop.
Save amiel/2698106 to your computer and use it in GitHub Desktop.
A snippet to help with debugging

puts-snippet

When adding quick debugging lines I like to include the file, line number, and method name so that I can easily find them again. This snippet makes that really easy.

It gives you something like this:

puts "#{__FILE__}:#{__LINE__}:(in full_filename) debug infos"
<snippet>
<description>puts debug</description>
<content><![CDATA[puts "${1:#{__FILE__\}:#{__LINE__\}:(in ${2:method}) }$0"]]></content>
<tabTrigger>puts</tabTrigger>
<scope>source.ruby</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment