473,587 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

debugging at class level ??

hi,

How can one set a conditional-breakpoint not linked to any particular
statement in a method but rather at class level so to speak ?

I'd like to break into debugging mode when e.g. the enabled-property of
a button belonging to a form changes, but not in any particular method.

thank you
Chris


*** Sent via Developersdex http://www.developersdex.com ***
May 2 '07 #1
8 1065
Chris,
I doubt there is a way to set this kind of "global breakpoint" that you
describe, but you can look into Debug.Assert as well as the Debugger.Break
method.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Chris Peeters" wrote:
hi,

How can one set a conditional-breakpoint not linked to any particular
statement in a method but rather at class level so to speak ?

I'd like to break into debugging mode when e.g. the enabled-property of
a button belonging to a form changes, but not in any particular method.

thank you
Chris


*** Sent via Developersdex http://www.developersdex.com ***
May 2 '07 #2
Hi,

I don't know of nothing like this. I have never seen a IDE with that
feature.

"Chris Peeters" <cm****@yahoo.c omwrote in message
news:eo******** ******@TK2MSFTN GP06.phx.gbl...
hi,

How can one set a conditional-breakpoint not linked to any particular
statement in a method but rather at class level so to speak ?

I'd like to break into debugging mode when e.g. the enabled-property of
a button belonging to a form changes, but not in any particular method.

thank you
Chris


*** Sent via Developersdex http://www.developersdex.com ***

May 2 '07 #3
On May 2, 11:26 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
I don't know of nothing like this. I have never seen a IDE with that
feature.
VB6 had this feature. It would break immediately after the line which
changed the watched value.

May 2 '07 #4
Right, but that isn't what the OP wants. The OP wants to say "any time
any method/property in this class is accessed, break".

The feature in VB allowed you to watch a value, and when it changed,
break.

Two very, very different things.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Andy" <an***@med-associates.comw rote in message
news:11******** **************@ q75g2000hsh.goo glegroups.com.. .
On May 2, 11:26 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
>I don't know of nothing like this. I have never seen a IDE with that
feature.

VB6 had this feature. It would break immediately after the line which
changed the watched value.

May 2 '07 #5
On Wed, 02 May 2007 09:30:04 -0700, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c omwrote:
Right, but that isn't what the OP wants. The OP wants to say "any
time any method/property in this class is accessed, break".
Actually, that's not how I read the OP either. While his first paragraph
seems to imply he wants to break "any time any method/property in this
class is accessed", as near as I can tell that's only because he didn't
write it very clearly. His second paragraph makes it pretty clear that
what he really does want is a data-based breakpoint, and while I haven't
looked for that in VS2005, it certainly has been present in previous
versions of that debugger and others. When putting the breakpoint on a
small enough variable, it can even be done using a hardware register,
allowing execution to happen at full speed.

It wouldn't surprise me if this is missing from VS Express, and it *would*
surprise me if it's missing in the retail versions of VS.

Pete
May 2 '07 #6
On Wed, 02 May 2007 10:00:52 -0700, Peter Duniho
<Np*********@nn owslpianmk.comw rote:
It wouldn't surprise me if this is missing from VS Express, and it
*would* surprise me if it's missing in the retail versions of VS.
Just looked. It's there, but not for C# or managed C++ code. Native
only. Doh.
May 2 '07 #7
Hi,

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:OY******** ******@TK2MSFTN GP02.phx.gbl...
Right, but that isn't what the OP wants. The OP wants to say "any time
any method/property in this class is accessed, break".

The feature in VB allowed you to watch a value, and when it changed,
break.

Two very, very different things.
This is not what the OP wants, he wants to break as soon as any member of
the class is accesed.
May 2 '07 #8
Hi,

"it certainly has been present in previous
versions" ... indeed, I used it in VS 6.0 with C++.

But apparently it is not available anymore for managed code.

Anyway, thank you all for taking your time

Chris
*** Sent via Developersdex http://www.developersdex.com ***
May 3 '07 #9

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

Similar topics

7
2139
by: Mikael Östberg | last post by:
Hello all! I have been working on a project for some time now and yesterday, my debugger stopped working. It is a class library which I run from a Win32 test app, so no IIS involved at this point. I can still set breakpoints and when debugging the breakpoints get hit - just like it would work normally.
16
4194
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the project in debug mode (by hitting F5) it gives an error message "Error while trying to run project: Unable to start debugging on the web server.
5
1131
by: Davids | last post by:
many of you probably remember using Response.Write(...) for debugging purposes, writing out the values of objects etc... How can I do the same with c#/ASP.Net ? It would be great to see some text I've put into - say - some debug string that is automatically output when running into code error?
3
1848
by: gaugust | last post by:
I am running Visual Studio .Net 2003 with Windows XP Pro and SP2. I am tying to run an ASP .Net application in debug mode. In Web.Config file I have set debug="true" but I am getting an error: "Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged." Not sure why I am...
5
7788
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an app.config file referencing arbitrary versions of the plug-in components they wish to consume. Here's the problem: Assuming I have installed any...
4
2083
by: dbee | last post by:
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted remotely, and it is receiving IPN (payment notifications) POST requests from Paypal. I've checked on google and irc and this is my last shot at solving...
23
2245
by: mike3 | last post by:
Hi. I seem to have made some progress on finding that bug in my program. I deactivated everything in the bignum package that was used except for the returning of BigFloat objects. I even crippled all the constructors. So now all the operations and constructors that were used do is just return BigFloats but no memory is actually accessed at...
4
12685
by: =?Utf-8?B?TWlrZSBHYWxl?= | last post by:
VS 2008 initially didn't debug classic ASP. SP1 fixes this in some ways. You can debug if you select the debug option to "Start Without Debugging, then either attach the debugger manually or place a stop directive in the code which ends up doing the same thing. The problem with this is that you can't debug browser side Javascript in the same...
7
4098
by: GaryDean | last post by:
(this was also posted on the MSDN WCF forum but the answers over there are not so good) I have a WCF Library hosted by IIS 6 and it all works fine. However I need to step through the code in the service. But when I hit F5 in VS2008 I get the following error message. . . A binding instance has already been associated to listen URI...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
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...
1
5713
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...
0
5392
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...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
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
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.