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 103224 - Deactivate of JPDA debugger module does not work
Summary: Deactivate of JPDA debugger module does not work
Status: CLOSED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on: 106539
Blocks:
  Show dependency tree
 
Reported: 2007-05-03 12:23 UTC by ehucka
Modified: 2010-04-29 09:32 UTC (History)
0 users

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 ehucka 2007-05-03 12:23:40 UTC
NetBeans IDE 6.0 Preview (M9, build 070502)
1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
Linux version 2.6.16-1.2122_FC5 running on i386
en_US (nb); UTF-8

After deactivation of JPDA debugger module in Modules manager debugger is
probably not fully deactivated.
There is Debug main project action enabled for j2se project. After starting of
debugging Debug toolbar is opened with actions Finish session, Continue, Step
Over, Step into and Step Out. 
Line breakpoints are not disabled too. Debugging of j2se application ends by
multiple exceptions.
If the debugger is activated again debugging fails by 
The service org.netbeans.modules.debugger.jpda.ui.breakpoints.BreakpointsUpdater
can not be created.
error.
Comment 1 Martin Entlicher 2007-05-09 19:00:24 UTC
The problem is, that the debug action is defined in the Java project
infrastructure, not debugger modules.
It looks like debugger core stays enabled, we'll explore the module dependencies.
Comment 2 ehucka 2007-05-21 09:54:04 UTC
Could you define required behavior in this case? Which actions and menus should
be unavailable after deactivate?
thanks 
Comment 3 Martin Entlicher 2007-05-21 15:25:56 UTC
Well, that's not so easy.
IMHO debugger actions like "Debug Main Project", "Debug File" and "Debug Test
for File" should be removed, or at least disabled.
But the debug task in the build-impl.xml can not be "disabled". It is just
written there and we could only disable "JPDA Debugger Ant Task".
It's not easy to do anything with the actions, since they just call the ANT task
and the ANT task is there regardless of debugger modules being installed.
Comment 4 Martin Entlicher 2007-07-09 15:43:28 UTC
After the fix of issue #106539 this is almost fixed. We only need to assure that Debugger Core UI module is uninstalled.
It's kept due to JPDA Debugger Heap Walker...
Comment 5 Martin Entlicher 2007-07-09 15:54:31 UTC
Heap Walker integration is uninstalled as well. Thus this is fixed now:

/shared/data/ccvs/repository/debuggerjpda/profiler/heapwalk/nbproject/project.xml,v  <--  project.xml
new revision: 1.3; previous revision: 1.2
Comment 6 ehucka 2007-07-10 10:10:50 UTC
It seems it is not fully resolved. I think after deactivate of jdpa debugger debugger/ide should be in a similar state
like in Basic IDE distribution - without java. So there is not Debug Main Project button in toolbar, there is not any
debugger action in Run menu and in Window | Debugging. Breapoints are hidden - not shown in editor. Debug File, Debug
Project actions should be removed from Java file or J2SE project menus.
Comment 7 Martin Entlicher 2007-07-10 12:51:41 UTC
Did you uninstall ANT debugger?
Comment 8 ehucka 2007-07-10 14:01:54 UTC
No. But after I tried to deactivate the ant debugger now Run menu does not contain debugger actions except the Debug
Main Project and Debug File actions. Window | Debugging menu does not contain Sources and Classes. But these were not
there already after deactivation of JPDA debugger.
Another thing, after activation of JPDA debugger breakpoints in Breakpoints view do not have icons and titles.
Comment 9 Martin Entlicher 2007-07-11 17:11:03 UTC
In Basic IDE this should work fine, after deactivation of "ANT Debugger" and "JPDA Debugger UI", all debugger-related
icons from toolbars and Run menu is gone.
Only Debug item in context menu on project node and files in Projects tab remains.
Therefore changing to P3 priority...
Comment 10 ehucka 2007-07-11 17:17:43 UTC
Remaining Debug Main Project action on toolbar in standard and full distribution is caused by wrong dependency of JSP
Breakpoints Support (issue 109404). 
Comment 11 Martin Entlicher 2007-09-18 16:41:16 UTC
We can get rid of Debug File from file nodes, but Debug item in context menu on project is hard-coded in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java :-(
Comment 12 Martin Entlicher 2007-09-19 16:03:37 UTC
Debug File action is moved to debuggerjpda/UI module:

/shared/data/ccvs/repository/java/project/src/org/netbeans/modules/java/project/layer.xml,v  <--  layer.xml
new revision: 1.30; previous revision: 1.29

/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml,v  <-- 
mf-layer.xml
new revision: 1.44; previous revision: 1.43
Comment 13 Martin Entlicher 2007-09-19 16:40:16 UTC
Remaining Debug action moved to debugger modules. That should assure that the action is removed on debugger uninstall.

/shared/data/ccvs/repository/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.31; previous revision: 1.30

/shared/data/ccvs/repository/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java,v
 <--  J2SELogicalViewProvider.java
new revision: 1.30; previous revision: 1.29

/shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/resources/mf-layer.xml,v  <--  mf-layer.xml
new revision: 1.83; previous revision: 1.82

/shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/ui/actions/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.18; previous revision: 1.17

/shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml,v  <-- 
mf-layer.xml
new revision: 1.45; previous revision: 1.44
Comment 14 Martin Entlicher 2007-09-19 16:45:59 UTC
Also the new DebugProjectAction is added:

/shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/ui/actions/DebugProjectAction.java,v  <-- 
DebugProjectAction.java
initial revision: 1.1
Comment 15 ehucka 2007-09-25 10:33:38 UTC
Debug Main Project and Attach Debugger still remain there.
Comment 16 Martin Entlicher 2007-09-25 16:17:11 UTC
:-) It's there because of ANT debugger.
Comment 17 ehucka 2007-10-01 15:18:13 UTC
Attach debugger of deactivated Java debugger throws exception:

java.lang.IllegalArgumentException: setSelectedIndex: 0 out of bounds
        at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
        at org.netbeans.modules.debugger.ui.actions.ConnectorPanel.refresh(ConnectorPanel.java:125)
        at org.netbeans.modules.debugger.ui.actions.ConnectorPanel.<init>(ConnectorPanel.java:103)
        at org.netbeans.modules.debugger.ui.actions.ConnectAction.actionPerformed(ConnectAction.java:76)
        at
org.netbeans.modules.debugger.ui.actions.DebugMainProjectAction$2.actionPerformed(DebugMainProjectAction.java:108)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

Debug main project of a j2se project ends on compile task.
Comment 18 Martin Entlicher 2007-10-01 16:33:35 UTC
Well, the attach action is defined in debugger core UI, but there are no attach types installed.
I've reproduced the exception.
Comment 19 Martin Entlicher 2007-10-02 12:55:34 UTC
The Attach Debugger action is disabled when there are no attach types registered. This fixes the NPE:

/shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/ui/actions/ConnectAction.java,v  <-- 
ConnectAction.java
new revision: 1.11; previous revision: 1.10

/shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/ui/actions/DebugMainProjectAction.java,v 
<--  DebugMainProjectAction.java
new revision: 1.3; previous revision: 1.2
Comment 20 ehucka 2007-10-19 13:10:52 UTC
Debug main project is still enabled after deactivation of java debugger. I tested it with java se nb distribution. There
is only ant and java debugger. And ant debugger cannot debug main project.
Comment 21 Martin Entlicher 2007-10-19 15:04:12 UTC
Hmm, I see. The action is provided by debugger core module, which must be enabled for ANT debugger. This will be tricky
to fix.
Comment 22 Peter Pis 2008-04-10 22:53:51 UTC
Changing TM for open issues.
Comment 23 Quality Engineering 2009-12-21 05:53:09 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team
Comment 24 Quality Engineering 2010-04-29 09:32:56 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.