使用 Visual Studio 进行 Html+css+javascript 开发
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19470872/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Html+css+javascript development with Visual Studio
提问by Arsen Zahray
My main experience with developing in Visual Studio is as c#/c++ developer. But now I need to create html+css+javascript front end for [probably] PHP code, and I've heard that Visual Studio has pretty nice capabilities in that range, including debugging javascript.
我在 Visual Studio 中开发的主要经验是作为 c#/c++ 开发人员。但是现在我需要为 [可能] PHP 代码创建 html+css+javascript 前端,而且我听说 Visual Studio 在该范围内具有非常好的功能,包括调试 javascript。
However, I can't find anywhere a "web" project (except for the ASP.Net stuff, which I'm not sure that it is the right thing).
但是,我在任何地方都找不到“网络”项目(除了 ASP.Net 的东西,我不确定它是否正确)。
Here's what I think I need to do:
这是我认为我需要做的:
- Create html file
- Create css file
- Include a bunch of javascript libraries
- Write my own javascript code
- Press F5 and debug the code in different browsers.
- 创建 html 文件
- 创建 css 文件
- 包括一堆javascript库
- 编写我自己的 javascript 代码
- 按 F5 并在不同浏览器中调试代码。
I'm mainly interested in intellisense, not a visual editor.
我主要对智能感知感兴趣,而不是可视化编辑器。
Is Visual Studio the right IDE for this kind of web development? And if it is, how do I set up the kind of project I described above?
Visual Studio 是适合这种 Web 开发的 IDE 吗?如果是,我如何设置我上面描述的那种项目?
回答by Bryan
I think the instructions at How do you add a folder to a project in Microsoft Visual Studio Express 2012 for Web?might work for setting up a Visual Studio project:
我认为如何将文件夹添加到 Microsoft Visual Studio Express 2012 for Web 中的项目中的说明?可能适用于设置 Visual Studio 项目:
1) New blank solution
2) Right click on the solution and select Add existing website
3) Browse and select the folder with your html, css, javascript, etc. files
4) Right click on the page you want it to start on and select set as start page
1) 新的空白解决方案
2) 右键单击该解决方案并选择添加现有网站
3) 浏览并选择包含 html、css、javascript 等文件的文件夹
4) 右键单击要启动的页面并选择设为起始页
As for running against different websites, you might try a Visual Studio extension. A decent starting list is here: http://www.asp.net/mobile/device-simulators
至于针对不同的网站运行,您可以尝试使用 Visual Studio 扩展。一个不错的起始列表在这里:http: //www.asp.net/mobile/device-simulators