How to display console.log output in Visual Studio Code for html?

岁酱吖の 提交于 2020-11-28 04:41:51

问题


When I used brackets, there was a plugin to display console.log output in a panel below the source code panel, so I don't need switch to chrome and press F12 to view console.log output.

But how to do that in Visual Studio Code?

I use Visual Studio Code for HTML development not Node.js.


回答1:


debugger-for-chrome can solve the problem. Check this link. It shows how to do that https://code.visualstudio.com/Docs/editor/debugging




回答2:


You could create an index.html and link to your .js in head then use Live Server with an "undock separate window."



来源:https://stackoverflow.com/questions/42106622/how-to-display-console-log-output-in-visual-studio-code-for-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!