Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Danneman101

macrumors 6502
Original poster
Aug 14, 2008
361
1
How do I debug (or see) a variables value if I dont have any room for text in my app? Is there a console that you can output text with debug-info to that runs at the same time as the simulator, kind of like you have in Flash-development?
 

Danneman101

macrumors 6502
Original poster
Aug 14, 2008
361
1
Thanks for the quick answer, jnic.

However, I need to view a variables content when navigating the app, and doing run->console only seem to do the initial code-setup.

Perhaps the easiest way would probably be to do a message-window:
Code:
// DEBUG: Alert-window
UIAlertView *debugAlert = [[UIAlertView alloc] initWithTitle:tempUrlString message:@"=savedUrlString" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[debugAlert show];
 

CommanderData

macrumors 6502
Dec 1, 2007
250
3
Thanks for the quick answer, jnic.

However, I need to view a variables content when navigating the app, and doing run->console only seem to do the initial code-setup.

Perhaps the easiest way would probably be to do a message-window:
Code:
// DEBUG: Alert-window
UIAlertView *debugAlert = [[UIAlertView alloc] initWithTitle:tempUrlString message:@"=savedUrlString" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[debugAlert show];

See my response in "that other iPhone SDK forum" you posted in ;)
 

Danneman101

macrumors 6502
Original poster
Aug 14, 2008
361
1
As I said in the "that other iPhone SDK forum" ;) I was under the impression that the console couldn't run alongside and in real-time with the simulator and only captured the code executed at setup. Stupid assumption, really, since that would make it really limited :p

This is much better than having a lot of pop-ups appearing with debug-info, so thanks (all of you) for clearing this out - debugging just became much easier :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.