Re: debugger woes
Re: debugger woes
- Subject: Re: debugger woes
- From: Serge Meynard <email@hidden>
- Date: Tue, 12 Apr 2005 15:31:26 -0400
On Apr 12, 2005, at 14:36, Luc Vandal wrote:
Sometimes when I debug my app, if I set a breakpoint I won't be able to step over it. No matter how many times I hit the Step Over button, the code after the breakpoint won't be executed. I also tried to hit the Continue button but nothing happens.
I tried once to restart my computer and that seemed to help. There's nothing bad in the function so I really don't understand what could cause this:
- (void)EnumerateVolumes
{
int o=0;
NSString *theFile = @"/Volumes/";
NSFileManager *manager = [NSFileManager defaultManager];
NSArray* pathDisplayArray = [manager componentsToDisplayForPath:theFile];
int i= [pathDisplayArray count];
NSString* diskName = [pathDisplayArray objectAtIndex:0];
[theFile release];
[diskName release];
}
That sort of thing often happens to me also, and it's annoying as hell. From what I've been able to find in the archives, it seems it has to do with the debugger trying to display an object that is not yet in scope (although other people claim that the bug has been fixed).
In the code that was giving me trouble, I just happened to have an NSArray declared in the middle of the code, just like the one you have above, and moving my breakpoint to the line after it gets initialized fixed the problem. I didn't try it, but I understand that declaring the array at the top of the method instead can also fix the problem more permanently.
Serge
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden