Permalink
Browse files

Better Debug tools

Revert "beter debug"

This reverts commit b11d7bddd6fc11d0dd5f4dcf0dc819b258d466bf.

Better debug

Revert "beter debug"

This reverts commit b11d7bddd6fc11d0dd5f4dcf0dc819b258d466bf.

beter debug
  • Loading branch information...
Manuel-777 committed Nov 6, 2018
1 parent 789e0ad commit 42c1eb886513ff865cbd1bd61990d927c6f26c5c
Showing with 11 additions and 17 deletions.
  1. +4 −14 main.js
  2. +7 −3 window_background/background.js
18 main.js
@@ -12,13 +12,6 @@ const {autoUpdater} = require("electron-updater");
// Adds debug features like hotkeys for triggering dev tools and reload
console.log(process.platform);
if (process.argv[0] == "-debug") {
console.log("** DEBUG MODE **");
require('electron-debug')({showDevTools: true});
}
else {
require('electron-debug')({showDevTools: false});
}
const debugBack = false;
const debugIPC = false;
@@ -44,13 +37,10 @@ app.on('ready', () => {
background = createBackgroundWindow();
globalShortcut.register('Alt+Shift+D', () => {
if (background.isVisible()) {
background.hide();
}
else {
background.show();
}
})
background.toggleDevTools();
overlay.toggleDevTools();
mainWindow.toggleDevTools();
})
mainWindow.webContents.once('dom-ready', () => {
mainLoaded = true;
@@ -558,7 +558,12 @@ function logLoop() {
ipc_send("popup", {"text": "No log file found.", "time": 1000});
resetLogLoop(500);
} else {
readLog();
try {
readLog();
}
catch (e) {
resetLogLoop(500);
}
}
});
}
@@ -2333,7 +2338,7 @@ function httpBasic() {
if (debugNet) {
ipc_send("ipc_log", "RECV << "+index+", "+_headers.method+", "+_headers.reqId+", "+_headers.token);
ipc_send("ipc_log", "RECV << "+index+", "+_headers.method+", "+results.slice(0, 100));
console.log("RECV << "+index, _headers.method, results);
console.log("RECV << "+index, _headers.method, results.slice(0, 500));
}
try {
var parsedResult = JSON.parse(results);
@@ -2342,7 +2347,6 @@ function httpBasic() {
parsedResult.components.forEach(function(ob) {
delete ob.id; delete ob.page_id; delete ob.group_id; delete ob.showcase; delete ob.description; delete ob.position; delete ob.created_at;
});
console.log("STATUS", parsedResult);
ipc_send("set_status", parsedResult);
}
if (parsedResult.ok) {

0 comments on commit 42c1eb8

Please sign in to comment.