Debugging Dojo in the Aurora starter store
You can debug Dojo in the Aurora starter store to help determine the locations of potential problems to resolve.
Debugging tools
Useful tools when debugging Dojo include:
- Google Chrome
- Includes built-in debugger tools
- Recommended: Mozilla Firefox with the Firebug add-on:
- You can edit, debug, and monitor CSS, HTML, and JavaScript.
- Serves as a network activity and DOM inspector.
- Available as an optional free browser add-on.
- Mozilla Firefox with the Web Developer add-on:
- Includes a CSS validator, an HTML validator, and a DOM inspector.
- Available as an optional free browser add-on.
- Microsoft Internet Explorer
- Includes built-in debugger tools
Debugging Dojo strategies
To see the debug messages in the console, enable Dojo logging. Open
theStores.war/StoreName/Common/EnvironmentSetup.jspf file and set
isDebug to true. By default, the isDebug value is set to
false:
<p><c:set var="dojoConfigParams" value="parseOnLoad: false, isDebug: false, modulePaths: {storetext: '${sdb.jspStoreDirFilePath}'}, useCommentedJson: true,locale: '${dojolocale}' "/></p>
The recommended debugging tool is Mozilla Firefox with the Firebug add-on.
The starter store uses Dojo's console.debug()
to trace JavaScript code in the
store. The debug statements display in the browser, at the bottom of the page.
You can use any of Dojo's five provided logging severity levels, however,
console.debug()
provides enough information to effectively debug Dojo in a starter
store.
For more information, see debugging tutorial, specifically the logging method section.