tweak some debug/logging options

This commit is contained in:
Val Erastov 2019-02-15 19:38:20 -08:00
parent a84da9cae1
commit 6a6c8d96eb
2 changed files with 5 additions and 4 deletions

View file

@ -19,7 +19,8 @@ export function activate({bus, services, streams}) {
services.action.registerActions(DebugActions);
services.menu.registerMenus([DebugMenuConfig]);
services.debug = {
LOG_FLAGS
LOG_FLAGS,
utils: window.__DEBUG__
};
streams.ui.controlBars.left.update(actions => [...actions, 'menu.debug']);

View file

@ -105,10 +105,10 @@ function processParams(params, context) {
setTimeout(() => runSandbox(context));
}
const DEBUG_FLAGS_PREFIX = "DEBUG.";
const LOG_FLAGS_PREFIX = "LOG.";
Object.keys(params).forEach(key => {
if (key.startsWith(DEBUG_FLAGS_PREFIX)) {
LOG_FLAGS[key.substring(DEBUG_FLAGS_PREFIX.length)] = true
if (key.startsWith(LOG_FLAGS_PREFIX)) {
LOG_FLAGS[key.substring(LOG_FLAGS_PREFIX.length)] = true
}
})
}