我在 VS2012 中有一个 MVC4 项目。
如何在浏览器中调试 VS 中当前打开的页面?当我在项目属性中选择“当前页面”时,总是会打开 Views 文件夹的路径。该路径应该没有 Views 文件夹。
当我选择“特定页面”并将文本框留空时,始终打开根目录。
我在 VS2012 中有一个 MVC4 项目。
如何在浏览器中调试 VS 中当前打开的页面?当我在项目属性中选择“当前页面”时,总是会打开 Views 文件夹的路径。该路径应该没有 Views 文件夹。
当我选择“特定页面”并将文本框留空时,始终打开根目录。
If you are using the MVC framework you are most likely using the routing system. To specify your starting page you need to give your project the path you want to open and not the view name (and selecting "current page" doesn't work because Visual Studio has no idea what route can be used to display the view your are on).
You need to manually set the Specific Page
in your project option (under the Web tab) to the path you want to use (let's say you want to call your home
path, then just fill up the field with home
).