Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'debugbar' #10060

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ end
group :development do
gem "better_errors"
gem "binding_of_caller"
gem "debugbar"
end

group :test do
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ GEM
database_cleaner-core (2.0.1)
date (3.4.1)
debug_inspector (1.2.0)
debugbar (0.4.3)
actioncable
rails
diff-lcs (1.5.1)
diffy (3.4.3)
dig_rb (1.0.1)
Expand Down Expand Up @@ -1040,6 +1043,7 @@ DEPENDENCIES
dalli
dartsass-rails
database_cleaner-active_record
debugbar
diffy
equivalent-xml
erb_lint
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/design_system.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<% if user_signed_in? %>
<% content_for :head do %>
<%= debugbar_head if defined? Debugbar %>
<meta name="govuk:components_gem_version" content="<%= GovukPublishingComponents::VERSION %>">
<%= javascript_include_tag "admin/domain-config" %>
<%= javascript_include_tag "govuk_publishing_components/load-analytics" %>
Expand Down Expand Up @@ -99,4 +100,5 @@
},
],
} %>
<%= debugbar_body(mode: :poll, poll: { url: "http://whitehall-admin.dev.gov.uk", interval: 1000 }) if defined? Debugbar %>
<% end %>
5 changes: 5 additions & 0 deletions config/initializers/debug_bar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return unless (defined? Debugbar) && Rails.env.development?

Debugbar.configure do |config|
config.enabled = true
end
Loading