AppSuite:Debugging the UI: Difference between revisions

From Open-Xchange
No edit summary
Line 3: Line 3:
__TOC__
__TOC__
== What capabilities are available? ==
== What capabilities are available? ==
<pre class="language-javascript">  
<pre class="language-javascript">
_(ox.serverConfig.capabilities).pluck("id").sort();
_(ox.serverConfig.capabilities).pluck("id").sort();
</pre>
== Which files failed to load? ==
<pre class="language-javascript">
requirejs.s.contexts._.registry
</pre>
</pre>



Revision as of 08:26, 17 September 2013

Debugging the UI

Synopsis: A collection of hints to debug during UI development

What capabilities are available?

_(ox.serverConfig.capabilities).pluck("id").sort();

Which files failed to load?

requirejs.s.contexts._.registry

Check settings

 
// check core settings
require('settings!io.ox/core').get();
// check mail settings
require('settings!io.ox/mail').get();

Clear all persistent caches

Please mind that this does not clear the regular browser cache! It clears localStorage, IndexedDB, and WebSQL.

 
ox.cache.clear();

Debug relogin

 
ox.autoLogoutRestartDebug();

Enable/disable capability via URL hash

Just add the parameter "cap" to URL hash. A leading minus disables a capability. Multiple capabilities separated by comma. Example:

 
...&cap=emoji,-calendar

Disable source caching via URL hash

Add the parameter "debug-js=true" to URL hash. Example:

 
...&debug-js=true

Debug a specific folder

If you want to get details of a specific folder, just inspect it via dev tools and look for data-obj-id="...". Copy the id and run the following in console:

 
void require('io.ox/core/api/folder').get({ folder: 'default0/INBOX' }).always(_.inspect);