add debug for locating startup issues (#4481)

This commit is contained in:
Jim Ehrismann authored and GitHub committed 2021-12-02 09:34:06 -05:00
1 parent 6e543961ac
commit f78d9c5fc2
1 file changed
+16
+16
View File
@@ -90,15 +90,23 @@ if (process.env.LENS_DISABLE_GPU) {
app.disableHardwareAcceleration();
}
logger.debug("[APP-MAIN] initializing remote");
initializeRemote();
logger.debug("[APP-MAIN] configuring packages");
configurePackages();
mangleProxyEnv();
logger.debug("[APP-MAIN] initializing ipc main handlers");
initializers.initIpcMainHandlers();
if (app.commandLine.getSwitchValue("proxy-server") !== "") {
process.env.HTTPS_PROXY = app.commandLine.getSwitchValue("proxy-server");
}
logger.debug("[APP-MAIN] Lens protocol routing main");
if (!app.requestSingleInstanceLock()) {
app.exit();
} else {
@@ -112,6 +120,8 @@ if (!app.requestSingleInstanceLock()) {
}
app.on("second-instance", (event, argv) => {
logger.debug("second-instance message");
const lprm = LensProtocolRouterMain.createInstance();
for (const arg of argv) {
@@ -295,6 +305,8 @@ autoUpdater.on("before-quit-for-update", () => {
});
app.on("will-quit", (event) => {
logger.debug("will-quit message");
// This is called when the close button of the main window is clicked
const lprm = LensProtocolRouterMain.getInstance(false);
@@ -324,6 +336,8 @@ app.on("will-quit", (event) => {
});
app.on("open-url", (event, rawUrl) => {
logger.debug("open-url message");
// lens:// protocol handler
event.preventDefault();
LensProtocolRouterMain.getInstance().route(rawUrl);
@@ -343,3 +357,5 @@ export {
Mobx,
LensExtensions,
};
logger.debug("[APP-MAIN] waiting for 'ready' and other messages");