By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,144 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,144 IT Pros & Developers. It's quick & easy.

code continues after stop debugging

P: n/a
I have a public sub in a class that does something like:

If ValuesChanged() Then
UpdateDatabase
End If

ValuesChanged and UpdateDatabase are Private functions within the class.

My problem is, when I finish debugging ValuesChanged and click the stop
debugging button, it appears the code continues behind these scenes and runs
UpdateDatabase.

Why doesn't it stop or how can I get it to stop? TIAFYT
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
It should not unless you have already fired off the command in SQL Server. If
so, stopping debugging only stops the client, as it does not contact the
server, at all. At this point, the code is still running (on the server)
despite you stopping it (on the client). You have to break before you contact
the server to stop server code.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"ENathan" wrote:
I have a public sub in a class that does something like:

If ValuesChanged() Then
UpdateDatabase
End If

ValuesChanged and UpdateDatabase are Private functions within the class.

My problem is, when I finish debugging ValuesChanged and click the stop
debugging button, it appears the code continues behind these scenes and runs
UpdateDatabase.

Why doesn't it stop or how can I get it to stop? TIAFYT

Nov 19 '05 #2

P: n/a
ENathan wrote:
I have a public sub in a class that does something like:

If ValuesChanged() Then
UpdateDatabase
End If

ValuesChanged and UpdateDatabase are Private functions within the class.

My problem is, when I finish debugging ValuesChanged and click the stop
debugging button, it appears the code continues behind these scenes and runs
UpdateDatabase.

Why doesn't it stop or how can I get it to stop? TIAFYT


I believe 'Stopping' debugging means you're just detaching from the
process, not stopping the request. VS.NET is then releasing it's lock
on the process and the request continues on the server.

I've never tried before, but try entering the following command in the
Command Window before hitting Stop:

Response.End()

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.