• Anonymous
  • Login
  • Register
XPage Debug Toolbar

Owners Mark Leusink Project Creation Jan 13, 2012
Contributors - Last Release Apr 2, 2013
Downloads 2813Download latest release
Rating
(10 ratings)
Description XPage Toolbar for logging (to a database or the toolbar), view scope variables, read server files


This is the project site of the winner of the 3rd OpenNTF Development ContestVisit my blog to view my other projects or read other interesting articles.

The XPage Debug Toolbar is a custom control that adds a toolbar to the top of any XPage. It has 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)
  • A "timers" tab you can use for basic code profiling (see how fast your code is).
  • Tommy Valand's API inspector.

 

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).

dBar.info( "my message");
dBar.debug( "a debug message");

dBar.info( message:String, context:String);
dBar.warn( message:String, context:String);

dBar.debug( message:String, context:String);
dBar.error(message:String, context:String);

 

The toolbar also allows you to dump the contents of any variable to the messages tab using:

 

dBar.dump( anyObject );

 

More information on how to use the features of the toolbar can be found in the demo XPage in the download!

 

Note:  If you want to use the toolbar 8.5.2 you need to add the two required Java classes to a custom Java src folder as described here.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



Projects can have short and readable URLs, e.g. http://mobilecontrols.openntf.org.

You can request a short URL to your project by sending a mail to support at openntf dot org.
Owners are the people with maximal rights. For example they can create releases and add more contributors.

In order to define multiple owners use "," (comma) as separator.

Because of data privacy you cannot lookup other people's names but you have to type them in.
Enter the contributors or owners here who you want to receive notifications and questions by email.

In order to define multiple owners use "," (comma) as separator.

Because of data privacy you cannot lookup other people's names but you have to type them in.
In addition to the owners additional OpenNTF contributors have to be listed here. Contributors don't have the same access rights as owners, e.g. they cannot create releases.

In order to define multiple owners use "," (comma) as separator.

Because of data privacy you cannot lookup other people's names but you have to type them in.
Enter a short description of the project here (up to 100 characters).

The short description shows up in the project UI and in some of the views.
In this field you should enter a more detailed description of your project.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.
A Catalog Release is for projects that are production ready and that are end-user "install friendly".

This property describes whether any release of this project has been added to the catalog.

Learn more about the catalog.
GitHub can be used as source control repository for OpenNTF projects. In this case the Issues from GitHub are used instead of the Defects from OpenNTF.

Contact ip-manager@openntf if you want to have a GitHub project created in the OpenNTF space.

Learn more about OpenNTF on GitHub