The XPages Debug Toolbar plugin adds a toolbar to the top of any XPage. It comes with the following features:

  • Personal log/ debug messages you've added in your code by using one of the log calls. no need for print() or _dump() statements anymore! You can log messages from SSJS and Java (beans) code and can also dump entire stacktraces to the debug toolbar.
  • The contents of the various scopes (applicationScope, sessionScope, viewScope and requestScope).
  • A list of custom environment variables (e.g. browser, user, database)
  • API Inspector

Being a plugin you need to install this only once on your server and in Domino Designer. It will add an extra category (Debugging) to your controls palette that will show the toolbar. Drop it on your page and your done.

Logging to the toolbar

The log/ debug messages are stored in the sessionScope, so they are unique to the current user and are persistent when switching between XPages or when doing a (partial) refresh. In the message tab you'll also find an “open in external window” link: this will open a separate XPage (“debugToolbarConsole”) that you can always leave open and that will automatically refresh to show the latest messages.

Adding a message to the debug toolbar is easy: just use one of the following commands (the difference is in color coding and the “context” parameter is optional).

You can use the following functions to log messages from SSJS: msg );

dBar.warn( msg );

dBar.error( msg );

dBar.dump( variable );


You can log messages from Java/ managed beans to the Debug Toolbar using the following methods

DebugToolbarBean.get().info( String msg );

DebugToolbarBean.get().info( String msg, String msgContext );

DebugToolbarBean.get().debug( String msg, String msgContext );

DebugToolbarBean.get().debug( String msg );

DebugToolbarBean.get().error( String msg );

DebugToolbarBean.get().error( String msg, String msgContext );

DebugToolbarBean.get().error( Throwable e );

DebugToolbarBean.get().warn( String msg );

DebugToolbarBean.get().warn( String msg, String msgContext );