Debugging Question - VS 2008 web services on Cassini - visual-studio

I'm testing a web service in Visual Studio, and stepping through using the debugger.
Then I click stop debugging. This stops the debugging session, but the program continues to run like a runaway train.
Is this a "bug" or a "feature" of Visual Studio 2008? If it's a feature, how can I tell Visual Studio to halt execution when I click on 'stop debugging'?

The web server that visual studio uses will keep running in the background. You should be able to stop it using the icon in the task bar.

Or if you have lots of instances running, my favourite little trick is to pop open the run command and type:
tskill webdev

When you run webservices, even when you stop them, they still run on the background, what you can do is look in the taskbar on the right hand side and close out the instances of the webservice that are running by right clicking on the icon and pressing stop.

While you've stopped debugging the application chances are that the asp.net developement server is running. you should be able to stop that from its tray icon

Related

Shutdown asp.net core application

I started to learn ASP.NET Core and cannot find a way to shutdown asp.net core application if it was started from Visual Studio by "Run without debugging"
If I start it from console by dotnet run it can be shut down by Ctrl+C
How I can find my running app and stop it when it was started from VS?
In your taskbar at the right, there'll be in a icon for IIS Express. Right-click that and you can choose to stop individual sites or IIS Express entirely. You may need to expand the system tray area to see the IIS Express icon.

Stop site when stopping debugging

I think this might be related to:
Visual studio debugger, dont stop website on stop debugging
And:
How can I prevent Visual Studio 2013 from closing my IIS Express app when I end debugging?
In Visual Studio 2015, it appears that the behavior has changed again, and now when I stop my application in VS 2015, the website continues to run in IIS. That's not necessarily a problem, except when I then try to restart the website I get this error dialog:
And now I can't debug anymore (none of my breakpoints will be hit). Note that it absolutely is not a Release build and it debugged just fine the first time.
So how can I make it either not throw up that dialog and have debugging just work? Or else make it so that it stops the website in IIS when I stop the debugging (note: as far as I can tell "edit and continue" is still on for my project)
Under the "Debug" menu, you have the ability to "Terminate All" and this is what I have been using to make sure that the IIS express instance is closed as well so I don't run into these issues.

How to close a crashed Visual Studio debugger?

I feel pretty ridiculous having to ask this, but is there an easy way to close Visual Studio while it's debugging?
I'm debugging my application, and when switching to full screen it crashes. I am unable to alt-tab to visual studio to stop the debugger, and I'm unable to pull any other windows on top of the full screen application.
I can, however, see the start bar. I can right click on visual studio and click close, but it does nothing (same goes for the debugging application).
I'm unable to get the task manager to show in front of the full screen application.. However, I'm on Windows 8 and I've noticed the Metro interface still works (and all metro apps). If I could find a little command prompt metro app I'm sure I could get around this, but I'm unable to.
Is there an easier way to resolve the issue without having to restart my pc each time I crash?
Almost forgot to mention, I'm on Visual Studio 2013
Edit: Forgot to mention, I'm programming on-the-go on a laptop; I only have the one monitor for this situation
I found a solution:
I can toggle focus to Visual Studio via Windows' Alt-Tab hotkey. This won't bring up Visual Studio, though.
Usually the problem is an unhandled exception, which requires me to hit "break." Since I gave Visual Studio focus, I can hit enter to select break.
I then use the Shift+F5 hotkey to stop the debugger
You might be able to use Developer Command Prompt - see MDbg.exe (.NET Framework Command-Line Debugger) to debug and kill your process

Visual Studio: How can I start the development server WITHOUT opening a browser window or seeing a warning?

Visual Studio 2010 Professional
So I want to be able to "Start Debugging (F5)" or "Start Without Debugging (Ctrl + F5)" without a) Opening a browser window or b) Getting an error message from Visual Studio
I tried the following:
Setting "Start Action" to "Don't open a page. Wait for a request from an external application"
This works great for debugging, however if I start without debugging I get this error message every time:
Setting "Start Action" to an external program that doesn't do anything. This works great for starting without debugging, however if I try and debug then the debugger starts and stops immediately.
I don't even understand that VS error message. I'm "Starting Without Debugging"... of course there's nothing to debug! Stop bothering me!
Thanks in advance!
I can provide a workflow that only opens a browser window when you first start a development session. I know you don't want to open a browser window ever. If this is a workflow preference, then I have found the solution below good-enough for myself.
I keep the start action as 'Current Page'. When starting a development session, I use 'Start Without Debugging' to start the ASP.NET Development Server, and a web browser. I close the web browser, but the Development Server remains running and continues to server requests for your application.
If the debugger is not attached, and I make a code change, the I use 'Build Solution (F6)' to rebuild, and the Development Server uses the newly built binaries. Changes to views are automatically detected and re-compiled.
To debug, I use Debug -> Attach to Process (CTRL + ALT + P for me) and find the correct running WebDev.WebServer40.EXE process based on the port.
The Development Server remains running as long as the solution remains open in Visual Studio.

How do I keep the development web server (Cassini) running in Visual Studio 2008?

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?
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
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/
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.
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
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.
In Visual Studio 2015 you do this by going to Tools > Options > Debugging > General and unchecking the "Enable Edit and Continue" option:

Resources