Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 83057 - auto-switching between debug sessions does not work correctly
auto-switching between debug sessions does not work correctly
Product: debugger
Classification: Unclassified
Component: Java
All All
: P2 (vote)
: 5.x
Assigned To: Martin Entlicher
Depends on: 83055
  Show dependency treegraph
Reported: 2006-08-20 02:09 UTC by Lukas Jungmann
Modified: 2006-10-03 14:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

promised patch (2.65 KB, patch)
2006-08-20 02:17 UTC, Lukas Jungmann
Details | Diff
sample project for testing (34.93 KB, application/octet-stream)
2006-08-20 02:19 UTC, Lukas Jungmann
screenshot of 2 debug sessions when ${name} should be active (77.50 KB, image/png)
2006-08-20 02:23 UTC, Lukas Jungmann
simpler apps for reproduction... (21.73 KB, application/octet-stream)
2006-08-22 14:05 UTC, Lukas Jungmann
The patch that fixes this issue. (4.68 KB, text/plain)
2006-08-29 17:37 UTC, Martin Entlicher

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-08-20 02:09:38 UTC
-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
 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.
Comment 1 Lukas Jungmann 2006-08-20 02:17:33 UTC
Created attachment 33094 [details]
promised patch
Comment 2 Lukas Jungmann 2006-08-20 02:19:13 UTC
Created attachment 33095 [details]
sample project for testing
Comment 3 Lukas Jungmann 2006-08-20 02:23:02 UTC
Created attachment 33096 [details]
screenshot of 2 debug sessions when ${name} should be active
Comment 4 Lukas Jungmann 2006-08-22 14:04:22 UTC
Another, simpler, use case
-have EJB module
-have Java SE client for it

see next sample...
Comment 5 Lukas Jungmann 2006-08-22 14:05:14 UTC
Created attachment 33155 [details]
simpler apps for reproduction...
Comment 6 Lukas Jungmann 2006-08-29 13:42:09 UTC
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.

Comment 7 Martin Entlicher 2006-08-29 14:27:34 UTC
The current session is really set only when the a breakpoint is hit. It needs to
be set also when a step is finished.
Comment 8 Martin Entlicher 2006-08-29 17:21:46 UTC
Fixed in trunk. It will be ported to release 5.5 after the review process.

new revision: 1.107; previous revision: 1.106

new revision: 1.4; previous revision: 1.3

new revision: 1.32; previous revision: 1.31

new revision: 1.29; previous revision: 1.28
Comment 9 Martin Entlicher 2006-08-29 17:37:36 UTC
Created attachment 33366 [details]
The patch that fixes this issue.
Comment 10 Martin Entlicher 2006-08-30 18:43:33 UTC
The fix is ported into release55 branch:

new revision:; previous revision:

new revision:; previous revision:

new revision:; previous revision:

new revision:; previous revision:
Comment 11 Lukas Jungmann 2006-10-03 14:53:19 UTC
v., thanks

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo