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

Consola logs do not appear in VSCode Debugger #311

Open
joshmossas opened this issue Jul 27, 2024 · 1 comment
Open

Consola logs do not appear in VSCode Debugger #311

joshmossas opened this issue Jul 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@joshmossas
Copy link

Environment

Node: v20.14.0
Consola: v3.2.3
OS: Pop!_OS 22.04 LTS

Reproduction

https://github.com/joshmossas/consola-debugger-bug

Describe the bug

When attached to a debugger consola logs never get printed out.

Below are some screenshots taken from running the app in my linked reproduction repository.

Running from the command line:

Both console.log() and consola.log() output to the console

image

Running with the debugger:

Only console.log() outputs to the console

image

Additional context

No response

Logs

No response

@joshmossas joshmossas added the bug Something isn't working label Jul 27, 2024
@joshmossas
Copy link
Author

Okay so I've figured out the issue. This due to a limitation with the VSCode debugger. See here:
microsoft/vscode#41600

Basically it doesn't read anything from stdout. It only reads logs going through the NodeJS debug socket.

To get around this you can do one of the following:

  • set outputCapture to std in your launch.json
  • set console to integratedTerminal or externalTerminal in your launch.json

or both.

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

1 participant