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.
There is no indication when a breakpoint is reached when debugging an application with remote attach (seen when debugging NetBeans from NetBeans). This used to bring the debugging IDE to front. It actually works when debugging a simple app which is run directly from the IDE. Happens both on JDK 1.5 and 1.6, this is on Vista.
and JDK 1.7 too. Has been reported both with Vista and XP
*** Issue 171044 has been marked as a duplicate of this issue. ***
This seems like a regression in org.openide.text.Line.show(). If a breakpoint is hit when running on Windows Vista, the debugger calls line.show(ShowOpenType.REUSE, ShowVisibilityType.FOCUS); line.show(ShowOpenType.OPEN, ShowVisibilityType.FRONT); but nothing happens - IDE does not go to front, neither the task bar blinks. In nb 6.5 it works partially, the task bar blinks, but IDE is not brought to front. Reassigning for evaluation.
*** Issue 175498 has been marked as a duplicate of this issue. ***
*** Issue 175519 has been marked as a duplicate of this issue. ***
??? The problem is still alive. Also on WinXp.
Does it happen also with simple Java app? I attach simple Java app with JFrame. Put breakpoint to line 66. It will be met on pressing button. What happens? I tested with dev build, 6.7.1, 6.5.1, JDK 6u17, Linux/Gnome. With dev build: 1.Put BP on line 66. Debug file from IDE. Test app window is active. 2.Press button inside frame. 3.IDE main window is activated and cursor is blinking inside editor as expected. Only IDE main window is not fronted but it is feature of OS WM. The same with 6.7.1. It does NOT work with 6.5.1 though. Please can you test the same on Windows and let me know? I will try the same at home with Vista.
Created attachment 90726 [details] Simple test app
In my Case it´s a simple JavaApplication on WindowsXp. I can´t start your Sample-Project: java.lang.NullPointerException at org.netbeans.modules.debugger.jpda.ant.JPDAStart.execute(JPDAStart.java:222) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor446.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) I think this is Bug 176042.
Spent some time playing with it and it seems that if during the IDE session I do *not* focus the windows console (command prompt window), then it works - i.e. IDE goes to front on breakpoint. If some console win gets active (selected in task bar), then it's not working since then. It's kind of strange, but I see this behavior pretty consistently. Also when the console window is selected (switched to) during IDE start then the IDE does not go to front on breakpoint. In this case the IDE even does not come to front after the startup (which it otherwise does) - just blinks in the task bar. If this is some kind of OS or JDK issue, I'd try to investigate if we can't get at least the same behavior as with the startup - i.e. blink in task bar if not coming to front (on breakpoint). That would be way better than do nothing.
Yes build 200911091156 (last available for download yesterday) still fails to debug with NPE. Alternatively you can get latest dev build from continuous builder eg. from http://deadlock.netbeans.org/hudson/job/NB-Core-Build/ws/nbbuild/ There is latest dev build zip from core-main repo.
When focus change happens between 2 separate native windows then winsys calls TopComponent.requestFocus. Then it is up to OS WM what will happen. Unfortunately on Vista, JDK 6u17 it does not work. Still test app window is active ie. selected on task bar. I am afraid there is nothing more we can do. I can ask Swing team what we can expect. Here is call stack when TopComponent.requestFocus is called by winsys as result of Line.show call: ++ ++ ESLS.show tc: INVOKE requestActive ++ TC.requestFocus tc:NewJFrame.java java.lang.Exception at org.openide.windows.TopComponent.requestFocus(TopComponent.java:760) at org.openide.text.CloneableEditor.requestFocus(CloneableEditor.java:912) at org.netbeans.core.multiview.MultiViewPeer.requestFocus(MultiViewPeer.java:249) at org.netbeans.core.multiview.MultiViewCloneableTopComponent.requestFocus(MultiViewCloneableTopComponent.java:153) at org.netbeans.core.windows.view.ui.AbstractModeContainer.focusSelectedTopComponent(AbstractModeContainer.java:198) at org.netbeans.core.windows.view.ModeView.focusSelectedTopComponent(ModeView.java:161) at org.netbeans.core.windows.view.ViewHierarchy.activateModeView(ViewHierarchy.java:395) at org.netbeans.core.windows.view.ViewHierarchy.activateMode(ViewHierarchy.java:389) at org.netbeans.core.windows.view.DefaultView.changeGUI(DefaultView.java:416) at org.netbeans.core.windows.ViewRequestor.dispatchRequest(ViewRequestor.java:269) at org.netbeans.core.windows.ViewRequestor.processRequest(ViewRequestor.java:245) at org.netbeans.core.windows.ViewRequestor.postRequest(ViewRequestor.java:183) at org.netbeans.core.windows.ViewRequestor.scheduleRequest(ViewRequestor.java:123) at org.netbeans.core.windows.Central.activateModeTopComponent(Central.java:1761) at org.netbeans.core.windows.WindowManagerImpl.topComponentRequestActive(WindowManagerImpl.java:1145) at org.openide.windows.TopComponent.requestActive(TopComponent.java:798) at org.openide.text.EditorSupportLineSet$SupportLine.show(EditorSupportLineSet.java:143) at org.openide.text.Line.show(Line.java:324) at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.showSourceLine(EditorContextImpl.java:185) at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.showSource(EditorContextImpl.java:170) at org.netbeans.modules.debugger.jpda.ui.SourcePath$2.run(SourcePath.java:367) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Weird with 6.7.1 the same test case works. I will investigate further.
It looks like some timing issue. Sometimes IDE window is fronted, sometimes it just blinks on taskbar.
Debugging a standard Java application on Vista, I never know when the debugger stops (Nor NB gets focus, nor the task button blinks). I must guess it when the application stops. Product Version: NetBeans IDE Dev (Build 200911160201) Java: 1.7.0-ea; Java HotSpot(TM) Client VM 16.0-b06 System: Windows Vista version 6.0 running on x86; Cp1252; es_ES (nb)
At WindowsXP, Java-Application it doesn´t works. Product Version: NetBeans IDE Dev (Build 200911161401) Java: 1.6.0_17; Java HotSpot(TM) Client VM 14.3-b01 System: Windows XP version 5.1 running on x86; Cp1252; de_AT (nb)
Marek Slama has a fix (or workaround) for this, but it does not seem safe for 6.8 to be integrated so late. Probably a candidate for patch.
I will commit fix to trunk once 68 is cloned. Calling toFront on top level window before requestFocus is called on TopComponent improves situation. As mentioned above we do not want to risk any regression for another use case so we will not put fix into 68 so late.
core-main #d810f42fca9f Please test on all platforms. toFront is called on top level window. It should improve situation.
on mac os x 10.6.2, jdk 1.6.0_15 the debugger window isn't fronted when a breakpoint is hit - it's the same behavior as without this fix
is this fix at 200911230200 available?
Changeset is not yet in main-golden so no. Once it gets into build it should be noted here as usual.
Integrated into 'main-golden', will be available in build *200911241400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/d810f42fca9f User: Marek Slama <mslama@netbeans.org> Log: #170976: Try to front newly focused window when focus is transferred between windows.
At WinXp the window doesn´t go to front but it blinks in the taskbar (1.6u17). That´s better then before.
Likewise in Vista: The NetBeans window blink. That's something
*** Bug 226239 has been marked as a duplicate of this bug. ***