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.

Bug 192159

Summary: Attach debugger option is inflexible and limited.
Product: cnd Reporter: misiu_mp
Component: DebuggerAssignee: Egor Ushakov <gorrus>
Status: RESOLVED FIXED    
Severity: normal Keywords: USABILITY
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description misiu_mp 2010-11-19 08:23:40 UTC
It should be possible to use netbeans as a drop in replacement for any gdb ui.
Right now there needs to be a project imported and (more importantly) the debugged binary has to be a product of that project (correct me if I am wrong here).
With pure gdb or through a GUI providing a direct gdb terminal (such as ddd), I can attach to any process at any time and start debugging immediately, provided I the source information is embedded in the binary or I point gdb to it. 
This is difficult in netbeans, as a project has to be assembled first.
Also it made it impossible for me to debug native java libraries (even when the library code is a project in netbeans), because netbeans complains that the java binary is not produced by the project (the project produces a shared library, which gets linked in run-time to the java process). At the same time I could attach with gdb separately and start working right away.

I find those problems in 6.9.
Comment 1 Egor Ushakov 2010-12-02 17:38:37 UTC
in 7.0 there are two new project types when attaching:
- no project
- create new project
So you should be able to attach even without a project.
You can try that in the latest dev build:
http://bits.netbeans.org/download/trunk/nightly/latest/