From: jaekuk, lee Date: Fri, 22 Mar 2019 06:03:35 +0000 (+0900) Subject: Implement Inspector X-Git-Tag: submit/tizen/20190329.010456^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F202044%2F8;p=platform%2Fframework%2Fweb%2Fwrtjs.git Implement Inspector Depends on: https://review.tizen.org/gerrit/201467 Change-Id: Ia0ea9c08cf1e6411e0105b2b1b12fc62e093a856 Signed-off-by: jaekuk, lee --- diff --git a/wrt_app/src/runtime.js b/wrt_app/src/runtime.js index acc25c0..3831bac 100755 --- a/wrt_app/src/runtime.js +++ b/wrt_app/src/runtime.js @@ -29,6 +29,7 @@ class Runtime { this.handleIpcMessages(); this.extensionManager = null; this.isLaunched = false; + this.debug_mode = false; var _this = this; app.on('will-finish-launching', function() { @@ -125,6 +126,12 @@ class Runtime { } // FIX ME : It must be supplemented to set a specific path wrt.setCookiePath(); + + // AUL public key - To support debug argument + if (!_this.debug_mode && appControl.getData('__AUL_DEBUG__') == "1") { + _this.debug_mode = true; + _this.launchInspector(appControl); + } }); wrt.on('suspend', function() { console.log('suspend'); @@ -158,5 +165,9 @@ class Runtime { return _this.extensionManager.deactivate(app, name); }); } + launchInspector(appControl) { + var data = { "port" : [ wrt.getDebuggingPort().toString() ] }; + appControl.reply(data); + } } module.exports = Runtime;