473,395 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Data Based breakpoints..

Does anyone know why some genius decided that data based breakpoints are not
supported in C#/ vb.net debugging?
Is there some technical reason Or has it been done to make breakpointing
more fustrating than ever?

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
Nov 16 '05 #1
5 5077
"Mark Broadbent" wrote :
Does anyone know why some genius decided that data based breakpoints are not supported in C#/ vb.net debugging?
Is there some technical reason Or has it been done to make breakpointing
more fustrating than ever?


Can't you use the breakpoint condition ? What do you exactly need ?

--
Francois Beaussier
Fr******@3ie.org.remove
Nov 16 '05 #2
I would prefer to have been able to do the data breakpoint, but I have been
trying and failing to get the condition /has changed to work. This may be my
stupidity *but* the documentation for this is very sparse and does not give
me a working example. I can get the "is true" condition to work fine but not
the has changed. If you can give my a sample code and what I should put in
the condition for the has changed condition I will be grateful. Otherwise my
foot is going through this Screen.

Thx

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Francois Beaussier" <Fr******@3ie.org.invalid> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl...
"Mark Broadbent" wrote :
Does anyone know why some genius decided that data based breakpoints are

not
supported in C#/ vb.net debugging?
Is there some technical reason Or has it been done to make breakpointing
more fustrating than ever?


Can't you use the breakpoint condition ? What do you exactly need ?

--
Francois Beaussier
Fr******@3ie.org.remove

Nov 16 '05 #3
"Mark Broadbent" wrote :
I would prefer to have been able to do the data breakpoint, but I have been trying and failing to get the condition /has changed to work. This may be my stupidity *but* the documentation for this is very sparse and does not give me a working example. I can get the "is true" condition to work fine but not the has changed. If you can give my a sample code and what I should put in
the condition for the has changed condition I will be grateful. Otherwise my foot is going through this Screen.


Lets try :)

Create a new Console application.
Copy paste the following in Class1.cs

---8<---
using System;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
int i = 0, j = 0;
while (true)
{
Console.WriteLine("{0} {1}", i, j);
if (j > 50)
{
i++;
}
j++;
}
}
}
}
---8<---

Put a breakpoint on the Console.WriteLine(...) statement
Go in the properties for this breakpoint and set the condition to "i"
and select "has changed".

Compile and run. The application will only break when i has changed
ie at the 50th Console.WriteLine(...)

Does that suit your needs ?

--
Francois Beaussier
Fr******@3ie.org.remove
Nov 16 '05 #4
You may use
System.Diagnostics.Debugger.Break();

"Mark Broadbent" <no************@no-spam-please.com> wrote in message
news:OZ****************@TK2MSFTNGP10.phx.gbl...
Does anyone know why some genius decided that data based breakpoints are not supported in C#/ vb.net debugging?
Is there some technical reason Or has it been done to make breakpointing
more fustrating than ever?

--
Br,
Mark Broadbent
mcdba , mcse+i
=============

Nov 16 '05 #5
merci Francois. That worked how I expected, do not know why it wasnt working
for me, but seems to work fine now. It would be nice to be able to set a
break on the change of variable (i.e. not dependant upon a particular line)
but at least this now works as I expected. (really dont know where I was
going wrong because I could have sworn I was doing this in my code)

Anyway Thanks again. :)

--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Francois Beaussier" <Fr******@3ie.org.invalid> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
"Mark Broadbent" wrote :
I would prefer to have been able to do the data breakpoint, but I have been
trying and failing to get the condition /has changed to work. This may be my
stupidity *but* the documentation for this is very sparse and does not give
me a working example. I can get the "is true" condition to work fine but

not
the has changed. If you can give my a sample code and what I should put

in the condition for the has changed condition I will be grateful.

Otherwise my
foot is going through this Screen.


Lets try :)

Create a new Console application.
Copy paste the following in Class1.cs

---8<---
using System;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
int i = 0, j = 0;
while (true)
{
Console.WriteLine("{0} {1}", i, j);
if (j > 50)
{
i++;
}
j++;
}
}
}
}
---8<---

Put a breakpoint on the Console.WriteLine(...) statement
Go in the properties for this breakpoint and set the condition to "i"
and select "has changed".

Compile and run. The application will only break when i has changed
ie at the 50th Console.WriteLine(...)

Does that suit your needs ?

--
Francois Beaussier
Fr******@3ie.org.remove

Nov 16 '05 #6

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

Similar topics

6
by: Grant Schenck | last post by:
Hello, I'm trying to figure out how to debug a very simple COM object I developed in VB. I'm very new to VB and ASP so I have a lot to learn. That said, I found what I thought was perfect...
0
by: news.paradise.net.nz | last post by:
I have been developing access databases for over 5 years. I have a large database and I have struck this problem with it before but can find nothing in help or online. Access 2000 I have a query...
4
by: fred | last post by:
What has happened to my breakpoints? Whenever I start my application from the IDE in Visual Studio then all of the breakpoints show a "?" and a comment says "The breakpoint will not currently be...
2
by: MSK | last post by:
Hi, Continued to my earlier post regaring "Breakpoints are not getting hit" , I have comeup with more input this time.. Kindly give me some idea. I am a newbie to .NET, recently I installed...
1
by: jeem | last post by:
I am using ActiveState Komodo 3.5 to work on a large python 2.4 application with an extensive UI... I am attempting to debug the application and am setting breakpoints in 4 different *.py files.....
1
by: Jeff | last post by:
Hey How can I get a list of breakpoints in Visual Studio 2005, while the loaded solution is in Edit mode (not running or not debugging)... I'm trying to learn thousands of uncommented C# code...
1
by: harterc1 | last post by:
I have a form containing a listbox that when a line is selected in it, it opens another form containing data based on the selection (using a query that is dynamically altered for the new form's...
4
by: JohnR | last post by:
I understand the VS2005 still doesn't support data breakpoints in VB. My question is this.. does anybody know of a 3rd party product that DOES support data breakpoints in VB? As an aside, does...
2
by: =?Utf-8?B?TG9zdCBJbiBUaGUgV29vZHM=?= | last post by:
I've seen a ton of posts about similar problems, but none of the solutions were effective. I've been maintaining this VB code for 3 years, and this is the first time this has happened. It seems...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.