auchenberg / vscode-browser-preview

A real browser preview inside your editor that you can debug.
MIT License
4.39k stars 153 forks source link

How to enable console log? #166

Closed santiagowprr closed 3 years ago

santiagowprr commented 3 years ago

Hi! I'd like to be able to see the output of the console while using browser preview. Is that possible?

yume-chan commented 3 years ago

https://github.com/auchenberg/vscode-browser-preview#launch-and-debugging

With the Debugger for Chrome extension you can see console output in the Debug Console view.

sugamkarki commented 3 years ago

@yume-chan that is a bunch of codes. What am I to do with it? Can you please guide me?

sar commented 3 years ago

@yume-chan that is a bunch of codes. What am I to do with it? Can you please guide me?

Just install the Debugger for Chrome extension and create a .vscode/launch.json with the properties mentioned in the docs.

Here's a visual guide on launching the debugger with browser-preview attached that respects breakpoints and variable scopes.

auchenberg commented 3 years ago

Closer as the help is provided in the last comment.