From 541101aca99c20daeaf9f312fea1c3bbeb48ac33 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Fri, 22 Mar 2019 15:03:35 +0900 Subject: [PATCH] Implement Inspector Depends on: https://review.tizen.org/gerrit/201467 Change-Id: Ia0ea9c08cf1e6411e0105b2b1b12fc62e093a856 Signed-off-by: jaekuk, lee --- wrt_app/src/runtime.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; -- 2.7.4