简体   繁体   中英

Live Preview and Debug in Visual Studio Code

I am using Visual Studio Code in Mac to do web programming.

I see we could use shift+cmd+v to launch a preview and cmd+kv to launch a preview in a separate window.

But once we modify code and save it, does anyone know how to reload and update the preview (by shortcut by preference)? Additionally, is it possible to automate the updates?

Moreover, I have opened the Debug panel, once I click on the green button, it lets me Select Environment :

在此处输入图片说明

Does anyone know which one I should choose to debug client side HTML+JavaScript programs?

1.) The "Preview" you mention is for Markdown files. Its not supposed to render a proper HTML preview, that's why it doesn't work or refresh. As soon as you use it with Markdown files, it updates / refreshes as you type.

But there are a couple of HTML preview extensions in the marketplace, just search for "HTML Preview" and you should be able to find some.

2.) None of those options in your screenshot, VSCode does not ship with a client side debugger by default.

But you can install Debugger for Chrome which uses Chromes debugging protocol. Detailed instructions on how to use it are in the extensions README.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM