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 56712 - Wrong detection of debugging mode
Summary: Wrong detection of debugging mode
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 4.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: _ ludo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-21 09:43 UTC by Libor Kotouc
Modified: 2006-03-24 13:11 UTC (History)
1 user (show)

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 Libor Kotouc 2005-03-21 09:43:16 UTC
1. start App server in debug mode
2. debug project (e.g. web)

Server is STOPPED and then RUN. It should only deploy module and attach debugger.

Cause:
isDebuggable(target) method called in ServerInstance.startTarget(...) return false.
Comment 1 Libor Kotouc 2005-03-21 15:21:48 UTC
I used:

WinXP SP2, JDK1.4.2_06 (for both NB and App server), NB build 030321, transport
set to dt_socket or dt_shmem.


It does not occur always, but at least in 50-60 percents of cases.
Comment 2 _ ludo 2005-03-22 17:48:47 UTC
This is a p4, corner case.
Usually, you use the IDE "Debug" menu item of a project to debug the server.
The scenario describes makes and extra stop/start in debug mode, but this is
really not critical to the IDE, imo.
Comment 3 Libor Kotouc 2005-03-22 18:13:44 UTC
Maybe I badly described the problem.

Unnecessary restarting is done even if user only invokes 'debug project' by
repeatedly pressing F5 (e.g.).

In addition, this issue along with issue (#56714) is blocking the issue #51063.
Described use case was only a simple way how to demonstrate the behavior.
Method isDebuggable() is used when testing the App server state. When this
method returns false when it should return true, then user is not informed about
potencial conflict and a little bit later gets deployment error.
Comment 4 _ ludo 2005-03-22 18:52:21 UTC
can you confirm that this restart only occur the very first time you click on
the 'debug' menu, regardless of wether the AS is running in or not in debug mode?
I think this is the case, 

Comment 5 _ ludo 2005-03-23 02:21:36 UTC
Also, how do you do "1. start App server in debug mode"?
Via the IDE in the runitme tab? Outside the IDE?
Why you do not want to use the "Debug menu item form the IDE itself?
How common would be this scenario?

Comment 6 _ ludo 2005-03-23 02:59:28 UTC
I have a workaround at the plugin level.
But imo, ServerInstance.startTarget(...) or startDebugging() is called with a
null Target parameter, and I don't think this is correct.
Comment 7 Libor Kotouc 2005-03-23 10:09:06 UTC
It looks that it works well.