Debug Toolbar
Dependency :
compile ":debug-toolbar:0.1"
Summary
Installation
grails install-plugin debug-toolbar
Description
Grails Debug Toolbar is a plugin inspired from Django Debug Toolbar created Rod Hudson (http://robhudson.github.com/django-debug-toolbar/).This plugin provides an easy way of including the debugging capability for the requests made to your web application.After installing the plugin you need to add a custom tag provided by plugin to your pages (better way is always to add it your layout file).The custom tag <debugToolbar:renderMe/> will only render elements when either
As of version 0.1 of this plugin there are debug panels for
Above command line will create grails-app/panels/SomeDebugPanel.groovy which you can update to render your own debugging information. Your panel will automatically become part of tool bar.
<body>
<div id="spinner" class="spinner" style="display:none;">
<img src="${resource(dir:'images',file:'spinner.gif')}" alt="Spinner" />
</div>
<div class="logo"><img src="${resource(dir:'images',file:'grails_logo.jpg')}" alt="Grails" /></div>
<g:layoutBody /> <debugToolbar:renderMe/> </body>- You are in development mode or,
- You have explicitly enabled its use by providing a config option
debugToolbar.enabled = true- Versions - It display version of grails, application, java and installed plugins
- HTTP Headers - The HTTP headers passed in your request
- Request Variables - Cookies, Session, and Request
- Config - Your configuration options
grails create-debug-panel Some
Future work
- Currently the views of debugtoolbar need to go in the grails-app/views of the application. When you install the plugin they are automatically copied to your application grails-app/views. Need to avoid this.
- JavaScript and static resources for the toolbar reside in web-app/debugtoolbar. It is also copied to your application web-app/debugtoolbar. Need to avoid this.
- A way of ordering the panels in the toolbar. Currently it is random depending on how beans are found during execution of tag.
- More useful panels such as Timing the requests, SQL queries, logging etc