From 09aa593c53066b33301ac96c5ee0a723550f066b Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 31 Jul 2021 18:48:27 +0900 Subject: [PATCH] Update chrome.js --- lib/chrome.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/chrome.js b/lib/chrome.js index fadf2cd..0c9ce03 100644 --- a/lib/chrome.js +++ b/lib/chrome.js @@ -496,11 +496,15 @@ var ChromeObject = function() { this.checkDebuggingPort = function() { var isChecked = false; - if (this.debuggingPort > 0) { - var result = SHELL.exec("netstat -ano | findstr :" + this.debuggingPort); - if (result.indexOf(":" + this.debuggingPort) > -1) { - isChecked = true; + try { + if (this.debuggingPort > 0) { + var result = SHELL.exec("netstat -ano | findstr :" + this.debuggingPort); + if (result.indexOf(":" + this.debuggingPort) > -1) { + isChecked = true; + } } + } catch(e) { + console.error("ChromeObject.checkDebuggingPort() -> " + e.message); } return isChecked;