is it a bug?

Discussion in 'iOS Programming' started by arnieterm, Sep 10, 2009.

  1. arnieterm macrumors regular

    Joined:
    Aug 28, 2008
    #1
    I am using iphone sdk 3.0. In xcode IDE, I have placed breakpoint at some place within my code. Later when I remove the breakpoint, the debugger still stops on the same point. I have tried all the standard fixes like Clean/Clear All Targets, removed the project from simulator.
    This problem appears both on simulator and iphone. Can anybody tell me what is the possible solution for this problem?
    Thanks
    Arnie
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    I have seen this, there are different causes.

    Do you have more than one project that uses the same source file? If you set a breakpoint in a file in one project it will stop at that breakpoint in another project that uses the same source file.

    Is it possible that you have another breakpoint in the file that is higher up in the file but is inside an area of code that is commented out? For some reason if you set a breakpoint in a comment the debugger sets a breakpoint in the first code that comes after the comment. This can result in the behavior you describe.

    The breakpoints are stored in a file inside the project bundle. You can delete this file. Open the project bundle by selecting it in the finder and right clicking and choosing 'Show Package Contents.' Delete all the files in there except for the one name project.pbxproj. This will delete all your breakpoints and a few other things that can be rebuilt.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Xcode can rebuild the .xib's, the main.m, the .pch and the Info.plist? :confused:
     
  5. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #5
    The breakpoints are stored in a file inside the project bundle. You can delete this file. Open the project bundle by selecting it in the finder and right clicking and choosing 'Show Package Contents.' Delete all the files in there except for the one name project.pbxproj. This will delete all your breakpoints and a few other things that can be rebuilt.

    The project bundle is what you think of as the project file. So UICatalog.xcodeproj is a project bundle. If you open it up, like I describe, you'll find three or four files in there. Keep the one named project.pbxproj. Delete the other ones. The other ones will have your user name in them and they'll be automatically rebuilt when you next open the project.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    Ah, sorry. My apologies. I misunderstood. Thanks for the clarification.
     

Share This Page