netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Debug open duplicate tab

Open edrobal opened this issue 4 weeks ago • 10 comments

Apache NetBeans version

Apache NetBeans 28

What happened

In debug when we set breakpoint in a class tab, when debugger reach this breakpoint, it open duplicate tab. Note that the breakpoint is not shown in the new open tab.

Language / Project Type / NetBeans Component

java class

How to reproduce

Set a breakpoint and debug.

Did this work correctly in an earlier version?

Apache NetBeans 24 or earlier

Operating System

Linux

JDK

jdk 1.8

Apache NetBeans packaging

Other

Anything else

No response

Are you willing to submit a pull request?

No

edrobal avatar Dec 03 '25 17:12 edrobal

I followed the "how to reproduce" instructions and no, that does not happen. Start with a clean user directory (you can use --userdir on command line and point it to a not yet existing directory), don't use an existing project or at least provide it. From that give exact instructions to reach the point you are observing.

matthiasblaesing avatar Dec 03 '25 17:12 matthiasblaesing

please attach the log file (but restart NB first)

mbien avatar Dec 04 '25 07:12 mbien

messages.log

edrobal avatar Dec 04 '25 11:12 edrobal

the log file is from a debugging session when a breakpoint opened another tab?

mbien avatar Dec 04 '25 11:12 mbien

The main class is in a project and breakpoint is in an other project class (my framework). Framework contains 440 classes.

edrobal avatar Dec 04 '25 11:12 edrobal

Main class for test is in Cafi.java. Breakpoint is in MajFrame.java

edrobal avatar Dec 04 '25 11:12 edrobal

ok. well I am not sure how this could happen.

the debugger has two modes (its a checkbox in the settings). One will keep opening new tabs (if they aren't open already) each time a breakpoint is hit or you step into a method, the other will open one tab and reuse that (that is the default).

I am not sure how it could duplicate an already opened tab.

You could try to reset the UI via Window -> Reset Windows, this might help in case there is something wrong with the TopComponent tracking.

mbien avatar Dec 04 '25 12:12 mbien

New test .

  • I close tab with breakpoint.
  • I restart debug.
  • When debugger reach breakpoint, it open new tab without showing breakpoint. (see image).
Image

edrobal avatar Dec 04 '25 12:12 edrobal

I found that if breakpoint is in same project that main class, no problem occurs.

edrobal avatar Dec 05 '25 12:12 edrobal

I show you a capture before starting and after reaching breakpoint.

Image Image

edrobal avatar Dec 14 '25 13:12 edrobal