views:

91

answers:

3

I create a asp.net page and test the code in debug mode step by step.

I always think that the code will stop running after I click "stopping debugging" in VS2008 when I test it in IE because the IE closes immediately.

Today, I use Firefox to test it. I find that the code still executes continuously after I click "stop debugging".

I want the code stop running immediately even in FF.

What should I do?

+1  A: 

I imagine you are, with IE, just 'running' the project, and IE opens immediately? And with Firefox, you open firefox manually, and navigate to the appropriate site?

The difference is that with running it, Visual Studio will close the browser when you stop debugging. In Firefox, because Visual Studio didn't open the browser, it won't close it.

Does that make sense?

Either way, the code still "exists" in both cases, and only runs when it's executed.

Noon Silk
I have already opened FF and vs2008 automatically opens a new tab and run the webpage.
Billy
Ah okay, slightly difference scenario then the one I proposed. Regardless, I see no reason why you should want VS to automatically close Firefox for you. But is that what you want?
Noon Silk
I click the confirm button to postback to the server side. I set a breakpoint before the response.redirect code to look at the value of a variable. And then I click "stop debugging". I suppose it will remain in the same page after I "stop debugging", but the fact is the response.redirect code runs.
Billy
All 'stop debugging' has done at that point is detach from the process. When it's running with IE, it also kills the process, because, [for reasons I don't know], the stopping of debugging when running with IE as your default browser, also stops the inbuilt web server in Visual Studio. I'm sorry I'm not more helpful, but you shouldn't worry about this behaviour.
Noon Silk
@silky -- the web server is still running. I have IE set as my "default" debugging browser but often switch back and forth between FF and IE. I can continue to use FF after I've stopped debugging and the IE window goes away.
tvanfosson
A: 

Crazy question but do you set Firefox to be the default browser when ran? (through VS).

Byrdsong
yes, I set Firefox as the default browser.
Billy
+1  A: 

Stop the web server from the task bar, assuming you are using Cassini. It will stop the debugger and the web site itself.

tvanfosson
Cassini? What's that? Let me google it.
Billy
Cassini is the web server that's shipped with VS2005/8. It's the one that will start up by default when debugging a web app.
tvanfosson