如何保持开发 Web 服务器 (Cassini) 在 Visual Studio 2008 中运行?

发布于 2024-07-08 10:16:15 字数 207 浏览 13 评论 0 原文

我正在使用 Visual Studio 2008 开发 ASP.NET 应用程序。 目前我正在 IIS 上运行调试。 我想切换到开发网络服务器(Cassini)进行调试,以便我可以使用编辑和继续等功能。 我之所以不这样做,是因为开发 Web 服务器仅在您处于调试模式时启动。 有什么方法可以让它始终运行,并且只需将 Visual Studio 附加到现有服务器进程,就像使用 IIS 一样吗?

I'm using Visual Studio 2008 to develop ASP.NET applications. Currently I'm debugging with running on IIS. I would like to switch to the development web server (Cassini) for debugging, so that I can use features like edit and continue. The reason that I'm not, is because the development web server only starts up when you are in debug mode. Is there any way to keep it running all the time, and just have Visual Studio attach to the existing server process like it does with IIS?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

深空失忆 2024-07-15 10:16:15

Rihan 部分正确...

在您的项目属性页面的 Web 选项卡中:启用编辑并继续

如果选中 - 当应用程序(而不是 VS)停止时,开发服务器将关闭。

如果未选中 - 开发服务器保持运行

Rihan is partially correct...

In your Project Property page, Web tab: Enable Edit and Continue

If checked - The Development server will close when the app (not VS) stops.

If unchecked - Development server keeps running

瑾兮 2024-07-15 10:16:15

您还可以从命令行启动卡西尼服务器,这会减轻整个“调试”工作的痛苦...

查看此处的一个很好的片段,了解如何执行此操作:https://thoughtjelly.wordpress.com/2009/05/13/launch-cassini-从命令行/

You can also start your cassini server from the command line which takes alot of pain out of the whole "debug" effort...

Check out a good snippet here on how to do this: https://thoughtjelly.wordpress.com/2009/05/13/launch-cassini-from-the-command-line/

此刻的回忆 2024-07-15 10:16:15

启动后,只要 VS2008 项目仍然打开,即使您停止调试,内置 Web 服务器也会继续执行。 当您想再次开始调试时,只需启动调试器即可。 我通常会打开另一个浏览器窗口,并从那里与内置 Web 服务器交互,而不是它打开的浏览器窗口,这样即使在关闭调试器(这会关闭打开的浏览器)后,我也可以继续以相同的状态使用应用程序窗户)。

我在 Windows XP SP3 上运行 VS2008。

Once started, the built-in web server continues executing even when you stop debugging, as long as your VS2008 project is still open. Just start up the debugger when you want to start debugging again. I typically have another browser window open and interact with the built-in web server from there instead of the browser window that it opens so I can keep working with the application in the same state even after turning off the debugger (which closes the opened browser window).

I'm running VS2008 on Windows XP SP3.

贪了杯 2024-07-15 10:16:15

我发现实现这一目标的最简单方法是正常启动调试器。 然后在 Visual Studio 中转到“调试”菜单,然后选择“全部分离”。 它与 Cassini Web 引擎分离,但不会像停止调试时那样将其关闭。

我很确定您知道可以使用命令行开关来启动卡西尼引擎,但我猜测您正在寻找稍微简单的东西。

分离不会关闭 Visual Studio 启动的浏览器窗口,如果您关闭该特定的 Web 窗口,它将停止调试。

我在没有 IIS 的 Vista 64x SP1 上运行 VS 2008 SP1。

希望能帮助到你
里汉·梅吉

The simplest way I have found to acheive that is by launching the debugger as normal. Then in Visual Studio goto the Debug menu, and select detach all. It detaches from the Cassini web engine, but it does not shut it down, as it does when stopping debugging.

I am quite sure you are know that there is command line swithces that you can you use to launch the cassini engine, but my guess is you are looking for something slightly easier.

Detaching does not close the browser window that visual studio launched, and if you do close that spesific web window then it will stop debugging.

I am running VS 2008 SP1 on Vista 64x SP1 without IIS.

Hope it helps
Rihan Meij

秋千易 2024-07-15 10:16:15

我有 3 个网站,每个网站之间都采用单点登录,因此我需要通过附加进程来启动所有 3 个网站。 但是,没有可以附加调试器的进程,每当我使用 F5 启动项目然后停止它时,Visual Studio Web 服务器就会关闭。

启用编辑并继续选项没有改变任何内容。

因此,要启动 Web 服务器并保持其运行,以便您可以将 Web 项目附加到进程中,我只需执行“在浏览器中查看”(ctrl+shift+W)。 这启动了服务器进程,但没有启动项目或调试器。 然后我可以轻松地附加到进程。

I have 3 web sites, with Single sign on between each site so I need to start all 3 with attach to process. However, there was no process to attach the debugger to, and whenever I started a project with F5 then stop it, the visual studio web server closed.

The Enable Edit and Continue option didn't change anything.

So to start the web server and keep it running so that you can attach the web project to the process, I simply did a "view in Browser" (ctrl+shift+W). This started the server process but not the project nor the debugger. I could then attach to process easily.

你不是我要的菜∠ 2024-07-15 10:16:15

在 Visual Studio 2015 中,您可以通过转到“工具”>“工具”来执行此操作。 选项> 调试> 常规并取消选中“启用编辑并继续”选项:

在此处输入图像描述

In Visual Studio 2015 you do this by going to Tools > Options > Debugging > General and unchecking the "Enable Edit and Continue" option:

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文