开发者

Watching Expression in Xcode

开发者 https://www.devze.com 2023-03-02 22:09 出处:网络
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
{
    if ([elementName isEqualToString:@"Badger"])
    {
        self.currentBusiness=nil;
    }
    if ([elementName isEqualToString:@"Title"])
    {
        self.currentBusiness.Title=self.currentProperty;
        NSLog(@"self.currentBusiness.Title=%@",self.currentBusiness.Title);开发者_JAVA技巧
    }
}

Okay The NSlog correctly print BadgerNew[2516:207] self.currentBusiness.Title=Martabak Telor India

Which is correct.

But if I add expression on the watch window and put

self.currentBusiness.Title

I got nothing. In fact, there is no way to know that self.currentBusiness.Title=@"Martabak Telor India" without NSLog

Am I missing something?


Check your "Active Configuration" in Xcode, it should be Debug.

Also go to project setting -> build. Under GCC 4.2 - Code Generation check "Generate debug symbols", set "Optimization Level" to "None" and "Level of Debug Symbols" to "All Symbols".

Hope this will help.

0

精彩评论

暂无评论...
验证码 换一张
取 消