473,888 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS2005 Executes Code After I Hit Stop

Hello,

I posted this in the C# group but thought maybe the better place would
be here since it is happening with website projects so please forgive
any cross posting.

In my website projects I can set a breakpoint, run the app, the
breakpoint gets hit, and I can step through or check some variables or
what not, and if I hit stop it appears that the rest of the method (and
any calling method) continues to execute. I know this because there are
sql calls being made (though they are on lines well after the line I
was on when I hit stop) and I can check the database and see that rows
were inserted/updated. As you can imagine, this is quite frustrating as
the whole reason I hit stop is that I *didn't* want to continue to do
work against the db. This never happened in VS2003 and only started
happening in VS2005 last week (I've been developing with it for several
months now).

Anybody else seen this? Any ideas are appreciated.

Jun 21 '06 #1
3 1409
dgk
On 21 Jun 2006 10:11:30 -0700, oh******@hotmai l.com wrote:
Hello,

I posted this in the C# group but thought maybe the better place would
be here since it is happening with website projects so please forgive
any cross posting.

In my website projects I can set a breakpoint, run the app, the
breakpoint gets hit, and I can step through or check some variables or
what not, and if I hit stop it appears that the rest of the method (and
any calling method) continues to execute. I know this because there are
sql calls being made (though they are on lines well after the line I
was on when I hit stop) and I can check the database and see that rows
were inserted/updated. As you can imagine, this is quite frustrating as
the whole reason I hit stop is that I *didn't* want to continue to do
work against the db. This never happened in VS2003 and only started
happening in VS2005 last week (I've been developing with it for several
months now).

Anybody else seen this? Any ideas are appreciated.

That's interesting. I'm using a database called Cache and it seemed
that in debugging a website some data got written that wasn't supposed
to because I hit the square Stop Debugging button. This is VB in
VS2005. It seems like a line did execute that wasn't supposed to.

The way the Cache DB works is very different from SQL Server in that
I'm actually using a proxy object that is linked to the real object in
the Cache DB, not rows in a table. So I was setting properties on that
object but not executing the Save method which was a good three or
four lines further in the code. However the changed property values
were being persisted in the DB even though Save hadn't been hit yet.

I called up InterSystems (the Cache vendor) and spoke to a support guy
about it but then I couldn't duplicate it. So I assumed that it was
sunspots. But now you come along and claim that VS continued executing
code after stopping and that matches exactly what I saw.

Perhaps it has something to do with Finally? That code is supposed to
execute no matter what. Did you have a Finally involved somewhere?
Jun 22 '06 #2
The only thing the finally does for me is close the database
connection. So if it was the finally being run the only thing that
should happen is that the connection closes with no work being done.
BTW, when stepping through the debugger and you hit stop the finally
shouldn't run. At least, it never did in VS2003. A friend of mine had
said that VS2005 is much more threaded than previous versions and that
sometimes causes all sorts of weirdness so we thought that might have
something to do with it but I really hope not.

Also also, I'm in now way dinging VS2005. I think MS made a great tool
even better. I just wish I could figure this problem out and fix it.

dgk wrote:
On 21 Jun 2006 10:11:30 -0700, oh******@hotmai l.com wrote:
Hello,

I posted this in the C# group but thought maybe the better place would
be here since it is happening with website projects so please forgive
any cross posting.

In my website projects I can set a breakpoint, run the app, the
breakpoint gets hit, and I can step through or check some variables or
what not, and if I hit stop it appears that the rest of the method (and
any calling method) continues to execute. I know this because there are
sql calls being made (though they are on lines well after the line I
was on when I hit stop) and I can check the database and see that rows
were inserted/updated. As you can imagine, this is quite frustrating as
the whole reason I hit stop is that I *didn't* want to continue to do
work against the db. This never happened in VS2003 and only started
happening in VS2005 last week (I've been developing with it for several
months now).

Anybody else seen this? Any ideas are appreciated.

That's interesting. I'm using a database called Cache and it seemed
that in debugging a website some data got written that wasn't supposed
to because I hit the square Stop Debugging button. This is VB in
VS2005. It seems like a line did execute that wasn't supposed to.

The way the Cache DB works is very different from SQL Server in that
I'm actually using a proxy object that is linked to the real object in
the Cache DB, not rows in a table. So I was setting properties on that
object but not executing the Save method which was a good three or
four lines further in the code. However the changed property values
were being persisted in the DB even though Save hadn't been hit yet.

I called up InterSystems (the Cache vendor) and spoke to a support guy
about it but then I couldn't duplicate it. So I assumed that it was
sunspots. But now you come along and claim that VS continued executing
code after stopping and that matches exactly what I saw.

Perhaps it has something to do with Finally? That code is supposed to
execute no matter what. Did you have a Finally involved somewhere?


Jun 22 '06 #3
I have the same problem. I'm using VS2005 Std. Ed. and while
debugging, even though you press 'stop', the code continues to execute,
writing to the database. I have the Try/Catch statements (but no
Finally)... very annoying when you're trying to test something.

My database server is remote, but debugging is always locally
processed, so I hope this gets fixed in future releases.

Jun 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
1361
by: clintonG | last post by:
VS2005 2.0 Beta 2 noting I've posted (to no avail so far) to the somewhat deadzone at news://microsoft.public.vsnet.ide and am getting ants in my pants for some discussion about this issue. Using regions to manage source code in the IDE is very useful however I prefer to align the region text on the left-most margin of the editor, i.e. margin-left 0; that is. The examples which follow show what I prefer and how VS2005 reformats the...
17
2588
by: Samuel | last post by:
Hi All, I am in the process of converting a VS 2003 project to VS 2005 project (VB.NET Class Library). It gives the error in TypeOf and DirectCast statements. It was working perfectly under VS2003.
16
1662
by: CMM | last post by:
Is it me or has anyone noticed that F1 is really dumb in VS2005. Since VB3 I have been able to click F1 on an ambiguous method in code and the IDE automatically determines the type based on the code itself and shows the right help topic. This even worked more or less in VS2003. But in VS2005, if I highlight the "Host" method below and hit F1 I get a help topic on the "UriBuilder.Host" property. Huh????? That's dumb. Dim o as New...
0
933
by: Richard | last post by:
When I run my web project in VS2005, the built-in development server pops up a bubble on the task bar showing which port is being used. No problem, except that it stays on the task bar even after I stop debugging. I've noticed this causes problems when I stop debugging, change data in SS2005, and then rerun the project: the updated data isn't refreshed on the web form. Before I change the data, I have to right-click on the bubble and choose...
16
1746
by: Edward Diener | last post by:
After spending more than a day reducing a complicated compiler bug to a simple case I reported it to the MSDN Product Feedback Center as a bug just now. However this bug is completely stymying my development of a VC++ component. Does Microsoft still offer any free bug reporting cases for VS2005, as they did two for VS2003 so that I can talk with a technical representative directly to try to find a workaround for the compiler bug ? While...
0
1198
by: Bob | last post by:
Hi, I have a dataset that is filled OK and used as the datasource for a datagridview. A mouse click on the datagridview picks the row. When I attempt to alter one of the ItemArray values the statement executes but nothing happens to the value. i.e. Inspection of the ItemArray when single stepping shows it hasn't changed. What am I doing wrong? Thanks Bob
6
1215
by: ohnoonho | last post by:
Hey All, In my website projects I can set a breakpoint, run the app, the breakpoint gets hit, and I can step through or check some variables or what not, and if I hit stop it appears that the rest of the method (and any calling method) continues to execute. I know this because there are sql calls being made (though they are on lines well after whatever line I was on when I hit stop) and I can check the database and see that rows were...
13
1481
by: Bryan | last post by:
I am developing a VB project in VS2005 that has SP2 installed. This is the process that is causing a problem: Open VS2005, open the project Write some code in the code editor Run the project in debug mode, test some of the forms Close the main form which returns me back to the VS2005 code editor *At this point, when I type anything in the code editor, parenthesis are inserted after every letter I type. Also I can't backspace past two...
5
2162
by: Ryan Liu | last post by:
I have this problem: "cannot continue edit while debug in VS2005". I see the same tread after I search this topic in google, but none solutions works for me. So again, I ask here. Can someone give a hand? Has MS fixed this in VS 2005? Is is fixed in VS 2008? Thanks, ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10772
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9593
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7988
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7143
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5810
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4635
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4239
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.