我已经打开了一个窗口,其中显示了我正在调试的网站.每次我需要调试时,我不需要 VS 为我启动另一个.
I already have a window open with the web site I'm debugging. I don't need VS to launch another one for me every time I need to debug.
有没有办法阻止这种行为?
Is there a way to stop this behavior?
推荐答案打开您的启动项目的属性(Project → {ProjectName} Properties... 从主菜单或右键单击您的项目Solution Explorer 并选择 Properties),然后导航到 Web 选项卡并在 Start Action 下选择 Don不打开页面.等待来自外部应用程序的请求.
Open your startup project's properties (Project → {ProjectName} Properties... from the main menu or right click your project in the Solution Explorer and choose Properties), then navigate to the Web tab and under Start Action choose Don't open a page. Wait for a request from an external application.
您仍然可以使用任何浏览器(或 Fiddler 等)来访问正在运行的应用程序,但它不会自动打开浏览器窗口,它只会在后台启动并等待任何请求.
You will still be able to use any browser (or Fiddler, whatever) to access the running application, but it won't open the browser window automatically, it'll just start in the background and wait for any requests.
更多推荐
启动调试时阻止 Visual Studio 启动新的浏览器窗口?
发布评论