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.
-have enterprise application with ejb module with some ejb (server side component) and application client - java app w/ main class from which ejb is called (client side component). -have set 2 breakpoints in attached project: - first in app client's main-class (line 33) - second in EJB impl class, in some method which is call from appclient's main class (eg. line 28) -to be able to debug client side and server side components simultaneously there have to be created two debug session - each component runs in its own container/JVM and comunnication between them is handled by RMI-IIOP protocol (so probably there's no way how to use just one debug session for both components) -patch from issue 83055 (solves problem with creating 2 debug sessions) and patch from this issue (just cosmetic change to simplify reproducing this) is required to be able to simulate described problem -assuming both patches were applyed, attached project is opened in the IDE and breakpoints are set as described earlier: 1) run Debug action on earproject 2) in dialog which appears press "No" => debugger correctly stops in appclient's main class, on line 33 3) press F8 (Step over) => debugger correctly swithes between debug sessions and stops on the breakpoint in ejb, on line 28 4) press F8 5) press F8 again => in debugger session tabs I can see: for appclient (sessionname: ${name}): Thread main stopped at Main.java:34. for serverside (sessionname: ${name}1): User program running so I would expect that I will see line 34 in appclient in green and I'll have debugging under control, but debug session is not switched back. To be able to correctly continue one have to go to Debug -> Session and switch debug sessions manually there. I think this should be handled correctly by the IDE, not by user.
Created attachment 33094 [details] promised patch
Created attachment 33095 [details] sample project for testing
Created attachment 33096 [details] screenshot of 2 debug sessions when ${name} should be active
Another, simpler, use case -have EJB module -have Java SE client for it see next sample...
Created attachment 33155 [details] simpler apps for reproduction...
After discussion w/ Libor and Martin we agreed on increasing the priority to P2 as multi-session debugging is one of the important features in debugger. It would be great to have the fix also in release55 branch. Thanks.
The current session is really set only when the a breakpoint is hit. It needs to be set also when a step is finished.
Fixed in trunk. It will be ported to release 5.5 after the review process. /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v <-- JPDADebuggerImpl.java new revision: 1.107; previous revision: 1.106 /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java,v <-- JPDAStepImpl.java new revision: 1.4; previous revision: 1.3 /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v <-- StepActionProvider.java new revision: 1.32; previous revision: 1.31 /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepIntoActionProvider.java,v <-- StepIntoActionProvider.java new revision: 1.29; previous revision: 1.28
Created attachment 33366 [details] The patch that fixes this issue.
The fix is ported into release55 branch: /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDADebuggerImpl.java,v <-- JPDADebuggerImpl.java new revision: 1.81.4.3.2.4; previous revision: 1.81.4.3.2.3 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/JPDAStepImpl.java,v <-- JPDAStepImpl.java new revision: 1.1.30.2; previous revision: 1.1.30.1 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepActionProvider.java,v <-- StepActionProvider.java new revision: 1.22.4.2.2.2; previous revision: 1.22.4.2.2.1 /shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/actions/StepIntoActionProvider.java,v <-- StepIntoActionProvider.java new revision: 1.19.4.2.2.2; previous revision: 1.19.4.2.2.1
v., thanks