 |
 |
Debugging java with Xcode 1.5
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
Hi, I've got a cocoa-java application that I'm writing in Xcode. Before the recent update, the debugger worked absolutely fine. Now, it doesn't.
It won't stop at breakpoints any longer. It's fine in pure java projects and seems to be ok in objective-C, but cocoa-java application projects will not stop at break points. Is anyone else having this trouble?
Thanks
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
Forgot to add this.
How to make it happen:
Create a new Xcode project and choose "Cocoa-Java Application" type from the "Application" section.
Double click the Interface Builder nib file from within the Xcode project window.
Add a button (or anything else which will send an event to a class) to the main window
Create a new class, with an action.
Connect the button to the action so that the action method gets called when the button is pressed.
Instantiate the class and add it to the project.
Close the Interface Builder nib file.
Put a few lines of simple code ( such as System.out.println("foo") etc ) inside the new method of the newly instantiated class file, and enable a breakpoint on one of these new lines.
Click "build and debug". When the app launches, click the button and the output you're expecting will appear ... but the debugger will not be entered. ie. The program execution will not pause at the breakpoint.
Makes it almost impossible to find/fix bugs!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Apr 2001
Location: 127.0.0.1
Status:
Offline
|
|
Yep, I've got the same problem here.
I quickly scanned Apple's java-dev list for a solution but came up empty.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
Hmm, there's no answer on Apple's discussions pages either (discussions.info.apple.com) however, someone else has mentioned the problem. I've sent a full bug report so hopefully something will come of that.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Dec 2003
Location: Montreal, Canada
Status:
Offline
|
|
The problem is that by default the debugger is set to be gdb instead of the java debugger. Do a Get Info on the executable in xcode and somewhere there is the option to specify which debugger to use. Change it to java debugger and you will be back in business.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
Originally posted by froodq:
The problem is that by default the debugger is set to be gdb instead of the java debugger. Do a Get Info on the executable in xcode and somewhere there is the option to specify which debugger to use. Change it to java debugger and you will be back in business.
Tried that, but I can't seem to see where to change it. Plus, this is an old project, so it should already have the correct debugger set.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Dec 2003
Status:
Offline
|
|
Real programmers don't document.
If it was hard to write, it should also be hard to understand.
Well what happens if your the one trying to understand the code you wrote a year ago?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Location: Edinburgh, Scotland
Status:
Offline
|
|
Originally posted by steve1341:
Well what happens if your the one trying to understand the code you wrote a year ago?
Umm, it's a joke! ...unless you're a sh*t-hot programmer in which case you'll either remember it all or understand it on your first re-read. Unfortunately I'm not one said programmers  and I do have to document a lot of my code.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|