This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I installed NetBeans 6.1 on MacOSX 10.5.2 and I created a "hello world" C++ console application. Compiled ok. When I try to debug it using the "Run and Debug" the gdb's console says "Launching" debugger... but it does not debug anything... seems it enters an infinite loop trying to attach gdb but it cannot. The fact is that I cannot debug the console C++ application. With other OSs(Ununtu, Windows) I can debug perfectly... but in MacOSX nope. btw, I have XCode 3.1 installed with GCC 4.0, 4.1 and 4.2. thx.
Can you Run your application (ie, without the debugger)? By default, we run and debug in an xterm. In the current release (and NB 6.5) its the user's responsibility to start an X server or to change the Console Type property to run/debug in the Output window. Please verify this isn't your problem. To change the Console type, right click the project node and select Properties. In the Project Properties panel, click on the Run node on the right and you should find Console Type to the right.
Yes, the app runs ok without debugging. I set the xterm... but the problem persists.
The next step is to see if gdb was started and what happened with it if it was. The gdb module creates a log file with all communications between the IDE and gdb binary. On Unix systems this file is usually in /tmp or /var/tmp and follows the naming pattern of gdb-cmds<number>.log. I'm not sure where this file is created on the Mac, but its the default location where Java creates temp files. Please look for this file and see if its getting created. If so, attach it to this issue so I can see whats going on. Have you tried debugging other programs? Specifically, have you created other sample apps? Also, is the "hello world" from our sample application or one you wrote? If its one of our samples, please try another. Our hello sample involves shared libraries and if other samples worked, that might give me a clue as to whats going wrong.
I just retested on my Mac (10.5.4 with gcc 4.0.1, g++ 4.0.1, and gdb 6.3.5 (apple version gdb-768). Debugging worked as expected. I used the subproject sample app and breakpoints worked in both the main project and dlopened shared library. At this point, both my QA group and I have retested debugging on the Mac and have been unable to find any problems. The gdb-cmds*.log might give me further information, but its also possible gdb was never started. In any case, I need input from you or I'll have to close as WORKSFORME.
My expectation is that this will end up being closed as WORKSFORME, but I'm adding WILLFIX because I expect to get this issue resolved in the next day or 2 (either fix it or WORKSFORME).
Anybody could tell me where to find the gdb log file so I can post it here, pls?
> Anybody could tell me where to find the gdb log file so I can post it here, pls? On my Mac its in /tmp. I don't know if thats true of all Macs but /tmp is the default location on Linux and other Unix derived operating systems (although Solaris puts it in /var/tmp).
Ok, got it. The log was on /private/tmp. I uploaded the NB6.1 project + the gdb log into megaupload: http://www.megaupload.com/?d=IHOTD282
Btw I got some extra info: I'm using gcc/g++ 4.0.1 Make GNU 3.81 gdb 6.3.50- 20050815 ( apple version 960 ). The gdb log , by the last lines, says gdb was killed. That was because like the debug was not being launched(I waited 2 minutes ), I pressed the stop debugging button. I installed Xcode 3.1 before Netbeans. Then I installed Netbeans 6.1... and I didn't patch it ( it's the version from the downloads section.... the ALL one ).
Please attach the log to this issue rather than uploading it to megaupload. I don't want to install software I'll probably never use again and its also fairly likely there won't even be a Solaris version for me to download and install. There is a "Create a new attachment" near the top of the issue. Just press it and fill in the form.
Created attachment 69769 [details] Netbeans 6.1 macosx gdb bug
Ok, the ZIP file was attached to this issue. The .log and the NB6.1 project are inside
The problem is in an incompatible change Apple made to their gdb after NetBeans 6.1 was released. The gdb module communicates with the gdb debugger via a protocol known as gdb/mi (mi is for machine interface). Apple enabled some timing information which we don't parse. That also explains why I've had so much trouble duplicating your problem. Its actually a duplicate issue and the original P1 bug has already been fixed. I'm closing this issue as a duplicate of IZ 142454 and asking QE to nominate 142454 for NetBeans 6.1 patch 4. Thanks for sending the log file. Since the problem was fixed in NB 6.5, it took your log file to be able to tell that its the same problem. *** This issue has been marked as a duplicate of 142454 ***