Solved

# How do you set a breakpoint on an array?

Posted on 2006-05-17
234 Views
I have an array of 64, and I'd like to set a breakpoint on all items when it hits 3.  Anyone know how?  I'm not sure where it's setting it to it, since there is a massive recursive function.
0
Question by:thunderchicken

LVL 2

Accepted Solution

You can set conditional breakpoints in your 'loop' or wherever you are using the array, and then set the condition on array.index = 3 or something like that, I don't know what kind of arrau so I can't help you out with that.

To add a conditional breakpoint, add a normal one, then rightclick and choose condition.
Here you will be able to define your condition!

Hope this helps,

Greetz,

Po\$\$e
0

LVL 11

Author Comment

There are about 60 places the array is being set, I'm looking for a way to set a global breakpoint, not in 60 different places.
0

LVL 2

Expert Comment

lol I understand the problem, especially if it concerns massive recursivity :)
Find a good spot for the breakpoint and then add the condition

Greetz,

Po\$\$e
0

LVL 2

Expert Comment

But anyway, why don't you use a Watch?
Just select the array variable, right click and 'Add Watch'

That way, you can see all items of your array when it is being used.

Add a breakpoint somewhere, add a watch on your array, and when breakpoint hits, look at watch to see all items in the array

Hope this is what you want?

Greetz,

po\$\$e
0

LVL 11

Author Comment

Somewhat, but when the function goes through over a million interations, it would kind of take a while.
0

LVL 2

Expert Comment

Then put a condition on your breakpoint that checks if array(3) isNot Nothing

Po\$\$e
0

## Featured Post

### Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
how to add IIS SMTP to handle application/Scanner relays into office 365.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…