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 157310 - Review UI change: Debug section in Project Properties
Summary: Review UI change: Debug section in Project Properties
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Stepan Doubrava
URL:
Keywords:
Depends on:
Blocks: 151788
  Show dependency tree
 
Reported: 2009-01-22 14:29 UTC by Alexander Pepin
Modified: 2009-08-18 10:38 UTC (History)
4 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
First patch (1.89 KB, text/plain)
2009-02-20 01:25 UTC, _ gordonp
Details
Seond patch (3.24 KB, text/plain)
2009-02-20 01:26 UTC, _ gordonp
Details
mkgdb2 script (908 bytes, text/plain)
2009-02-20 01:27 UTC, _ gordonp
Details
rmgdb2 script (421 bytes, text/plain)
2009-02-20 01:28 UTC, _ gordonp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2009-01-22 14:29:10 UTC
Please review Project Properties.
 In 6.5 it contained section "Debugging", now it's named "Gdb Debugger" to emphasize particular type of debugger. IMO it
would be better to call this section "Debug" to keep common style in naming (General, Build, Run, Debug) and create
subsections for each kind of debugger. "Debug" section itself should contain at least one combobox with a name of
currently selected debugger like we have for "Tool Collection" in "Build" section.
Comment 1 Egor Ushakov 2009-01-28 16:02:40 UTC
I agree that "Debug" is a better name than "Gdb debugger" 
plus we have a "Tool" field already.
Comment 2 Egor Ushakov 2009-02-02 10:41:46 UTC
"Gdb Debugger" renamed to "Debugger" in:
http://hg.netbeans.org/main/rev/04c3433da049
Comment 3 Egor Ushakov 2009-02-03 12:48:35 UTC
Renamed to simple "Debug" in:
http://hg.netbeans.org/main/rev/a54ca12201a4
Comment 4 Alexander Pepin 2009-02-05 11:32:56 UTC
verified in Build 200902050256
Comment 5 Alexander Pepin 2009-02-05 11:33:38 UTC
verified
Comment 6 _ gordonp 2009-02-19 01:16:46 UTC
The intent of this was to support multiple C/C++ debuggers. In cases where only a
single C/C++ module existed, it should display "Debug" (this part never got implemented).
But in cases where multiple C/C++ debuggers co-exist, it needs something more generic
than "Debug" or "Debugger" (hence the "Gdb Debugger" label it originally had).

I'm doing some work on multiple debuggers for a 3rd party and when I have 2 debuggers
I get 2 "Debug" nodes. I'm reopening this issue because it needs to correctly support
multiple C/C++ debugger (and still work correctly when only a single debugger is installed).

Note: I've got a script which creates a cnd.debugger.gdb2 module from cnd.debugger.gdb.
I can attach it to this issue if desired. While production netbeans won't ever have 2
gdb modules, its the easiest way to develop/test with multiple debuggers.
Comment 7 _ gordonp 2009-02-19 02:05:22 UTC
I have a fix which I can commit if desired. If a single C/C++ debugger is registered
then it behaves as it currently does and shows a single "Debug" node on the left with
the expected properties when its selected.

If multiple C/C++ debuggers are registered then it shows the Debugger Chooser node (this
is existing behavior but you won't see it without multiple debuggers). This chooser has
a subnode for each debugger. The subnodes use the display name of the customizer ("Gdb Debugger",
"Gdb2 Debugger", and possible "Dbx debugger"). In addition, the chooser has a property
which lets you choose which debugger is the active one (again, this is existing functionality
which you can't see without multiple debuggers).

I'm CC'ing Thomas as most of the changes are in cnd.makeproject. The only gdb change
is to change the label back to "Gdb Debugger", but its not seen unless needed to remove
ambiguity.

This change (or a similar one) is needed for MC (I don't think I can put their name in the
issue, but Thomas knows who they are).
Comment 8 Egor Ushakov 2009-02-19 08:48:29 UTC
I still do not understand why should we have several debug sections in project properties...
Project can have only one toolchain active hence only one debugger which we show in debug section. Isn't it true?
Comment 9 _ gordonp 2009-02-19 17:43:08 UTC
You already have cases where it makes sense for a toolchain to support multiple
debuggers. Both GNU and SunStudio toolchains work with gdb in NetBeans and dbx
in Sun Studio. While both are good debuggers, why not let the user decide which
to use?
Comment 10 Alexander Pepin 2009-02-19 18:36:44 UTC
Gordon, please look carefully at the original description. I propose to have two (or more if we find more suitable
debuggers) subsections (child nodes) within "Debug" section. And "Debug" section itself will contain a combobox where a
user can select what debugger should be used for the project ans some common debugger options. GDB subsection will
contain GDB specific options and DBX subsection will contain DBX settings:

 |
 - o  Run
 |
[-]-o Debug    
 |  |-o GDB
 |  |-o DBX
 |
 -o Required Projects
Comment 11 _ gordonp 2009-02-20 01:03:12 UTC
Alexander, what you're showing is pretty much what I have (for multiple debugger):
 |
 - o  Run
 |
[-]-o Debuggers   
 |  |-o Gdb2 Debugger
 |  |-o Gdb Debugger
 |
 -o Required Projects

The "Debuggers" node displays a single property "Debugger Chooser" which is a
dropdown showing "Gdb2 Debugger" and "Gdb Debugger". If you replace Gdb2 with
Dbx you'll pretty much have what you'd expect with both gdb and dbx modules.

I do display differently if there is only a single debugger. In that case, its
unchanged from 6.5. A single "Debug" node (with no subnodes nor the Debugger
Chooser property) and the properties are the same as the current gdb properties
("Tool" and "Array Repeat Threshold").
Comment 12 _ gordonp 2009-02-20 01:25:37 UTC
Created attachment 77181 [details]
First patch
Comment 13 _ gordonp 2009-02-20 01:26:13 UTC
Created attachment 77182 [details]
Seond patch
Comment 14 _ gordonp 2009-02-20 01:27:45 UTC
Created attachment 77183 [details]
mkgdb2 script
Comment 15 _ gordonp 2009-02-20 01:28:25 UTC
Created attachment 77184 [details]
rmgdb2 script
Comment 16 _ gordonp 2009-02-20 01:31:46 UTC
Attached 2 patches per Thomas' request. The 1st patch is more for debugging multi-debuggers.
The 2nd patch is the proposed fix. I've also attached my mkgdb2 and rmgdb2 scripts. These make
a 2nd debugger (cnd.debugger.gdb2) from the cnd.debugger.gdb module. (Its hard to debug/test 2
debuggers if you can't make a 2nd one:-)

The scripts both assume an environment variable called "WStop" is the path of the netbeans
source tree. Since these were originally private scripts, the scripts silently do nothing
if this var isn't set. These were used in a Windows/Cygwin environment but should work on
Solaris or Linux. I had similar scripts in /home/gordonp/.bin when I was RIF'ed, but I don't
know if those are still available. Those were much better tested...
Comment 17 Alexander Pepin 2009-02-25 18:42:19 UTC
As a 'Debugger Command' is a part of toolchain then we can expect it will just contain a path to Dbx and therefore we
can use a 'toolchain' selector instead of 'debugger' selector in "Debug" section in the project properties or even
non-editable (information) field showing which debugger is contained in current toolchain (selected in "Build" section).
At the same time I believe that "Debug" section should always contain both debugger subnodes. It will show that we
support both (Gdb and Dbx) debuggers and these subnodes will show possible options for each debugger.
Comment 18 _ gordonp 2009-04-24 01:00:19 UTC
I'm not sure why you made this a task and chaged 151788 from task to defect.

This issue resolves one specific issue about making C/C++ debuggers coexist. On
the other hand, 151788 is generic and could be used to track multiple issues
which each add to mulitple debugger support. If you do want this to be the task,
you should probably make it depend on 163524.
Comment 19 Egor Ushakov 2009-08-18 10:38:57 UTC
fixed with:
http://hg.netbeans.org/cnd-main?cmd=changeset;node=0760e431d971

now we show only properties of active toolchain debugger