From 95d3d3a95d2cbb5fb81c54e827f367fae827e68b Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Fri, 13 Mar 2020 22:38:55 -0400 Subject: [PATCH] Support /debug nw This opens the desktop client's debugger, which for some reason doesn't open the way NW.js's documentation says it should. --- js/client-chat.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/client-chat.js b/js/client-chat.js index 414948a4b..9b10583fa 100644 --- a/js/client-chat.js +++ b/js/client-chat.js @@ -547,6 +547,12 @@ type: 'modal', htmlMessage: "Extracted team data:
" }); + } else if (target === 'nw') { + try { + nw.Window.get().showDevTools(); + } catch (e) { + this.add('|error|' + e.message); + } } else { this.add('|error|Unknown debug command.'); this.add('|error|Are you looking for /showdebug and /hidedebug?');