Different debugging options are available to the OSF for Drupal administrators and developers. All the debugging options discussed in this article are related to debugging the interaction between OSF for Drupal and OSF Web Services. All actions, all operations of OSF for Drupal modules end-up being web service queries to one of the OSF Web Services.
To access the debugging settings, click on the top
Configuration menu item. Then, you have to click the
Configure OSF for Drupal modules.
Then click the
Debugging tab. Now you will see all the configuration options.
The two debugging options that are available are:
Display all the calls being made by OSF for Drupal to OSF instance(s).
- This will display all the web service calls that are exchanged between OSF for Drupal modules and OSF Web Services. Every time you load a page, if a call is being made to a web service endpoint (except if it is a call to load an entity, see below), then the query will be displayed at the top of the page.
Display loaded Resource Type entities.
- This option will display all the CRUD: Read calls that are used by OSF for Drupal to load Resource Type entities. If you enable this option, you will have many more debugging outputs. Also note that if the entity is cached, then no call will appears. To make them appearing, you will have to clear Drupal's cache.
Once you are done, you only have to click
Save configuration to save the settings and start seeing debugging information appearing on the website.
It is possible to invoke the debugging output without changing the settings, and this, for any Drupal pages. This method also only apply to administrators. If a non-administrator uses this method, that user won't see any debugging output appearing.
The only thing you have to do is to add the
wsf_debug=1 parameter to any URL of the Drupal portal.
Every time a query is exchanged, a box will appear at the top of the Drupal page that is being loaded. The debug box looks like this:
Each of these boxes are individual queries sent to one of the OSF Web Services endpoint. The title of the box shows where the query has been sent (which endpoint, and which web service). Then, a series of information is displayed for each query:
- This is the same information that is in the title of the output; this is the endpoint URL where the query has been sent
- This is the HTTP method that has been used to send the query
- This is the mime type used to send the query
- These are all the parameters that have been used in the query
- This is the execution time of the query in drupal. What that means is that if the query goes to different kind of proxying servers before hitting the real OSF Web Service endpoint, then this proxying time will be included in the execution time displayed to the user. All the network latency will be included as well.
- This is the HTTP status ID returned by the endpoint's web server
- This is the HTTP status message returned by the endpoint's web server
- This is the HTTP status message description returned by the endpoint's web server
- This is the data returned by the endpoint, for that query.
- This is a serialized version of the WSQ object used to send the query. Many more debugging information may be available in this object.