Features
Print debug messages
Is there a better way to debug than printing messages?
I'll admit, the first thing I do when I want to debug something is to add a puts
or pp
statement in my code. I'm sure you do too.
This feature simply let you add messages to the debugbar to... debug.
Usage examples
1# In a controller 2class SomeController < ApplicationController 3 before_action do 4 Debugbar.msg("before_action", {params: params.permit!.to_h, callee: __callee__}) 5 end 6 7 def index 8 Debugbar.msg("Entering controller method", {something: something}) 9 end10end
1<!-- In a view -->2<% Debugbar.msg("Rendering navigation") %>