code continues after stop debugging

  • Thread starter Thread starter ENathan
  • Start date Start date
E

ENathan

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
 
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 said:
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()
 
Back
Top