Visual Studio 2005 - Debugging

Soldato
Joined
22 Oct 2005
Posts
2,884
Location
Moving...
I'm working with some big arrays (about 3 million elements) in Visual Studio 2005. When trying to debug it I want to look at the entire array, however VS is limiting it because it only displays the first 999999 elements. Is there anyway way round this so I can view the entire array, or if that's not possible specify a range to look at (not satarting at the first element)? I've had a look in the options/preferences but I cant see anything, a quick google has not helped either.

Thanks for any advice.
 
You want to look at all 3million array elements!!!!!! Or have I read that wrong?

As for the debugger itself, you can add a watch and change the parameters yourself, so if your array is called myArray, you could change on the fly myArray(##) where ## is the actual element you want to view.

Other than that, I've no idea how you'd see all 3million elements!
 
Well I really only need to see the first few hundred and the last few hundred just to check everything is working ok. However it's quite annoying typing out about 1000 singular array locations to add as a watch so I thought there may be a quicker way.
 
Where you want to check it you could loop through the few elements you want to view and output them using:
System.Diagnostics.Debug.WriteLine("text");
 
In the watch window type in &myarray[300],100 to see elements 300-399, though you might want to think about alternatives such as outputting the array to cvs format and view it in Excel.
 
Back
Top Bottom