Wednesday, December 2, 2015

Debugging tips for Aikau

Aikau tips & tricks

Tip 1) Turn on debugging in share-config.xml or share-config-custom.xml file.
           <!-- Developer debugging setting to turn on DEBUG mode for client scripts in the browser -->
<client-debug>false</client-debug>
By default, it will be false and change this value to true.

<client-debug>true</client-debug>

Tip 2) Post the client side error to the server side to log the error.
<!-- When this is set to true any Aikau based errors will be posted back to the server and 
            captured by the server side logging. This can be useful to detect when errors occur in 
            a users browser -->
 <post-client-debug>false</post-client-debug>
By default, it will be false and change this value to true.
 <post-client-debug>true</post-client-debug>
This way, the client side error will be logged into server side log file.


Tip 3) Add the debugger statement in the client side javascript file, so that, when the page /share calls, the client side widget, you can debug the client-side javascript. Once you added the debugger statement, you need to clear the dependency cache, otherwise, Share won't pick up the latest script or debugging will not happen.


Tip 4) If you make any changes in the client side javascript, you need to clear Dependency cache from http://localhost:8080/share/page/index url. 

No comments:

Post a Comment