Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate log lines in debug console in vscode #75

Closed
4 tasks done
ADumaine opened this issue Dec 12, 2022 · 6 comments
Closed
4 tasks done

Duplicate log lines in debug console in vscode #75

ADumaine opened this issue Dec 12, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@ADumaine
Copy link

Describe the bug

When starting my app with npm run electron-vite dev there is only one line for each console.log statement in the main background process.

When starting in vscode, every console.log line is duplicated: one from main, one from publicUtils.js.
image

This is the launch config

{
            "name": "Debug Main Process",
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceRoot}",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
            "windows": {
              "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
            },
            // "runtimeArgs": ["--sourcemap"]
          }

I am not sure if this is an electron-vite issue or a vite issue or I just have something misconfigured.

This was also happening prior to vite 4.x

Electron-Vite Version

1.0.16

Electron Version

22.0.0

Vite Version

4.0.0

Validations

@ADumaine ADumaine added the bug Something isn't working label Dec 12, 2022
@alex8088
Copy link
Owner

@ADumaine This is a issue with vite. electron-vite uses vite‘s createLogger which make it duplicate output during debugging. But it's okay. It's not a code bug.

@ADumaine
Copy link
Author

Ok. Do you know a way to suppress it or should I create a vite issue?

@alex8088
Copy link
Owner

It is unclear whether this problem also exists in web application development (debugging). I haven't found a way to suppress it.

@alex8088
Copy link
Owner

Later, I will also test whether web application development also has this issue.

@alex8088
Copy link
Owner

It only happens in vscode, it will be fixed in the next version.

@alex8088
Copy link
Owner

alex8088 commented Jan 7, 2023

new ver 1.0.17 is out!

@alex8088 alex8088 closed this as completed Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants