Help:Debug format

The result format debug is used to obtain background information on how Semantic MediaWiki has processed a query. This information helps to understand why a query might return unexpected results, and it is vital for developers to fix bugs in query answering.

Parameters
There are no inline query parameters specific to the debug format.

Example

 * Syntax


 * Result

How to read the debug output
The debug output contains some information that is only useful to developers, but it also gives some information that can be instructive to editors in a wiki for debugging a query.

The more readable parts are shown on top. This is usually a version of the wiki query as understood by SMW. The displayed query might be different from the user input. This may be due to SMW simply expressing some queries in different ways (different style of writing) but it may also show that some parts of the query were not understood or were wrongly understood by SMW.

Some statistical information on query size and query depth, and the encountered error messages are also shown. The size and depth are internal parameters used by SMW to limit the complexity of queries. The administrator of a wiki site may restrict queries to some maximal query size or depth (this will then be shown as an error if problematic), and this output may help to understand how size and depth work with certain queries.

The rest of the debug output is usually related to the internal storage functions executed by SMW to answer the query. This part also depends on the particular storage implementation and version of SMW, and usually developers will be the only ones to have any use for this.

Remarks
The details of the debug output depend on the version of SMW and the storage engine used. This information should be included into debug reports.