Professional Web Applications Themes

Problem running the debugger in Project Builder - Mac Programming

Hi all, Thought I'd teach myself Objective-C and Cocoa programming, for a bit of a laugh. I'm an experienced C and C++ programmer in the Windows and UNIX environments. So, I went out and bought a copy of the O'Reilly/ADC "Learning Cocoa with Objective-C" book, and began to read. Soon enough, I wanted to try the hello world example. So, I create a new project, creating a Foundation Tool. I can Build and Run the application successfully. If I then try to run the debugger with this app, I can set a breakpoint at the beginning of main(), and then ...

  1. #1

    Default Problem running the debugger in Project Builder

    Hi all,

    Thought I'd teach myself Objective-C and Cocoa programming, for a bit of
    a laugh. I'm an experienced C and C++ programmer in the Windows and
    UNIX environments.

    So, I went out and bought a copy of the O'Reilly/ADC "Learning Cocoa
    with Objective-C" book, and began to read.

    Soon enough, I wanted to try the hello world example. So, I create a
    new project, creating a Foundation Tool.

    I can Build and Run the application successfully.

    If I then try to run the debugger with this app, I can set a breakpoint
    at the beginning of main(), and then Build and Debug. Now, according to
    the doentation, and my book, it should run until it hits the
    breakpoint, and then at that point I should be able to do the usual
    debugging stuff - inspecting variables, stepping through the code, etc
    etc.

    However, it never gets that far. gdb appears to start up - the console
    pane says this:

    GNU gdb 5.3-20021014 (Apple version gdb-250) (Sat Dec 7 02:14:27 GMT 2002)
    Copyright 2002 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "powerpc-apple-macos10".
    r/X11R6/bin:/Developer/Tools
    run
    tty /dev/ttyp2
    r/X11R6/bin:/Developer/Tools
    [Switching to process 1110 thread 0xb03]

    And nothing else happens.

    Now clearly the bit below "This GDB was configured" looks a bit odd. It
    looks like a truncated UNIX path. I wonder, is something corrupted in
    my preferences which is stopping things from working?

    I have used Project Builder in the past to build applications downloaded
    from SourceForge, but I've never tried the debugger before.

    Any help gratefully received!

    Tim

    PS. In the unlikely event that it's relevant, here's my setup:

    12" PowerBook G4, 640 MB RAM
    OS X 10.2.8
    Some fink stuff installed but not much
    My personal login shell is bash, not tcsh

    Tim Guest

  2. #2

    Default Re: Problem running the debugger in Project Builder

    Tim Cutts <greenend.org.uk> wrote in message news:<vKp*chiark.greenend.org.uk>... 

    Not totally, sure but Cocoa programs only run the code you wrote and
    can see when you do some output or cause some user event. You might
    try to re-write your program so it has a button that you press and
    attach some code to that. Putting a breakpoint in this code and
    pressing the button should get you a breakpoint.

    --jim
    Jim Guest

  3. #3

    Default Re: Problem running the debugger in Project Builder

    In article <vKp*chiark.greenend.org.uk>,
    Tim Cutts <greenend.org.uk> wrote:
     

    Do you have a ~/.gdbinit file? If so, try moving or deleting it.

    -Eric

    --
    Eric Albert edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  4. #4

    Default Re: Problem running the debugger in Project Builder

    In article <stanford.edu>,
    Eric Albert <edu> wrote: 
    >
    >Do you have a ~/.gdbinit file? If so, try moving or deleting it.[/ref]

    found the problem in the end - my .MacOSX/environment.plist file had a
    carriage return in its PATH entry.

    Dunno how it got there, but it presumably stopped Aqua applications
    finding developer tools in the path.

    Tim

    Tim Guest

Similar Threads

  1. Flex Builder 3 - Debugger not working with breakpointsin the code
    By Exode90 in forum Macromedia Flex General Discussion
    Replies: 5
    Last Post: May 24th, 03:30 AM
  2. Flex Builder debugger launches hang
    By x77686d in forum Macromedia Flex General Discussion
    Replies: 3
    Last Post: May 7th, 10:55 PM
  3. Flex Builder is not building my Project
    By Thijyo in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: April 15th, 11:06 AM
  4. Project Builder using wrong compiler
    By Heather Donahue in forum Mac Programming
    Replies: 0
    Last Post: September 1st, 07:59 AM
  5. Project Builder: moving projects?
    By Daniel Griscom in forum Mac Programming
    Replies: 10
    Last Post: July 29th, 09:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139