简体   繁体   English

在 VS Code 中使用实时预览调试 asp.net core mvc web 应用程序

[英]Debug asp.net core mvc web application with live preview in VS Code

I'm a web designer and I want to visualize the code changes in real time in VS Code, but for now I haven't been able to do that with this kind of asp.net core application.我是一名 web 设计师,我想在 VS Code 中实时可视化代码更改,但目前我还无法使用这种 asp.net 核心应用程序做到这一点。

The "Live Preview", "Live Server" and "Five Server" extension didn't work. “实时预览”、“实时服务器”和“五服务器”扩展不起作用。 Maybe I'm doing it wrong, I don't know.也许我做错了,我不知道。 Can anybody help me?有谁能够帮我? Do you know if there is a specific way to do this?你知道是否有特定的方法可以做到这一点?

With "Five Server" appears the option to open with随着“五台服务器”出现打开方式的选项

But when it opens it looks like this但是打开之后是这样的

I agree with the suggestion given by @Crowcoder.我同意@Crowcoder 给出的建议。

VS Code doesn't have built-in support for HTML preview but there are extensions available in the VS Code Marketplace. VS Code 没有对 HTML 预览的内置支持,但 VS Code Marketplace 中提供了扩展。 Open the Extensions view (Ctrl+Shift+X) and search on 'live preview' or 'html preview' to see a list of available HTML preview extensions.打开扩展视图 (Ctrl+Shift+X) 并搜索“实时预览”或“html 预览”以查看可用的 HTML 预览扩展列表。

With the help of extensions, you could preview HTML files but in your screenshots, we could see that you want to preview the .cshtml file.在扩展的帮助下,您可以预览 HTML 个文件,但在您的屏幕截图中,我们可以看到您想要预览.cshtml文件。 Which is not supported even if you use any extensions.即使您使用任何扩展也不支持。

Reference: Does VS Code have HTML preview?参考: VS Code有HTML预览吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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