Implement Inspector 44/202044/8
authorjaekuk, lee <juku1999@samsung.com>
Fri, 22 Mar 2019 06:03:35 +0000 (15:03 +0900)
committerjaekuk lee <juku1999@samsung.com>
Wed, 27 Mar 2019 11:31:12 +0000 (11:31 +0000)
Depends on: https://review.tizen.org/gerrit/201467

Change-Id: Ia0ea9c08cf1e6411e0105b2b1b12fc62e093a856
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
wrt_app/src/runtime.js

index acc25c0..3831bac 100755 (executable)
@@ -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;