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 193508 - Java debugger is suggested for C/C++ projetcs
Summary: Java debugger is suggested for C/C++ projetcs
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-16 17:02 UTC by Alexander Pepin
Modified: 2011-06-03 18:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2010-12-16 17:02:09 UTC
If both JavaSE and C/C++ modules are installed but only C/C++ is activated and if a user calls Attach Debugger then JPDA (Java debugger) is suggested first together with "Activate" button whereas it's expected that a user is going to debug C/C++ application. It is very annoying as it appears every time when Attach Debugger is called.
Comment 1 Jaroslav Tulach 2010-12-16 19:12:41 UTC
I don't think this is an ergonomics problem. As far as I know there is no way to specify what debugger is preferred for what project type (java one is selected by some string match).

Also the fact the dialog does not remember the last used debugger type is not a flaw of ergonomics.
Comment 2 Martin Entlicher 2010-12-19 17:38:16 UTC
The dialog *does* remember the last used debugger type.

Therefore you have this problem just once after the first start. Due to this, it was not considered to be severe enough to be dealt with yet.

To fix this, we'd have to add AttachType.isDefault() method, that would return false by default and implementors could override it to return true when their projects/files are active.
I'll prepare an API change...
Comment 3 Martin Entlicher 2011-06-02 13:31:05 UTC
Well, IMHO it's not really possible to determine which debugger type is the user going to use during attach. The languages can be combined, for instance a C/C++ project can happen to be a part of Java program (JNI library). Thus IMHO it's better when the dialog currently remembers the last used debugger type than it if would suggest a wrong one.

Regarding the first invocation, I've added a check for an artificial attach type coming from ergonomics and we try to suggest some already installed one.

Fixed by changeset:   195132:1a3b05c191c4
http://hg.netbeans.org/main/rev/1a3b05c191c4

Merged into release701 branch as changeset:   199923:620b34dc1159
Comment 4 Quality Engineering 2011-06-03 18:18:23 UTC
Integrated into 'main-golden', will be available in build *201106031000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1a3b05c191c4
User: mentlicher@netbeans.org
Log: #193508 Prefer attach types that do not come from ergonomics.