You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alistair McKinnell edited this page Nov 29, 2015
·
6 revisions
Rationale
When debugging a Rails application a useful technique is to insert print statements into the server log. To make the debugging print statement stand out in the log it's useful to display a prompt prior to the debugging output. It can sometimes be necessary to distinguish between multiple debugging print statements. We can make this common operation easier by adding a live template just for this purpose.
Mechanism
Navigate to: Preferences > Editor > Live Templates
Click "Edit variables"
Now, when you are debugging and want to print the value of some variable:
copy the variable name
put the cursor on the line where you want to know the value of that variable
type pp and press Enter (or your expand live template key)