- This topic has 4 replies, 3 voices, and was last updated 20 years, 2 months ago by Piotr Smolinski.
-
AuthorPosts
-
Piotr SmolinskiMemberSometimes it is necessary to debug module and its environment. If we have sources (for example JBoss) it should be possible to browse them especially in debug mode. Eclipse’s JDT supports source attachment for remote debugging and MyEclipse (I think) uses this feature for AS debugging.
TIA
Piotr Smolinski
Riyad KallaMemberPiotr,
You can try and add the sources for JBoss as a src folder to your project and see if that works. The issue is that the Eclipse source located must be able to locate source code for the class file you are attemping to open… becuase you would never typically have a JBoss server JAR in your classpath you cannot attach the source to that JAR, so instead you will likely have to ADD the source directly to your project so the source located can find it.
Piotr SmolinskiMemberBut if you do remote debugging in Eclipse you are not obliged to attach binaries of debugged application. By launching application server, MyEclipse starts a new remote debugging session, but each time on different port (you can see it in debugging configurations catalog (menu Run/Debug…) as a position in Remote Java Application Branch).
My question is: Is it possible to attach server sources to server configuration to enable server debugging? Of course it isn’t necessary to ship server sources with MyEclipse distribution.
I really want not to attach server binaries to project beacuse it can burden project structure (even if attached as User Library) and my co-workers can include too many vendor dependiences in developed code.
Scott AndersonParticipantPiotr,
The easiest way I can think to do this is to create a separate Eclipse Java project that contains all the server’s source code. Simply importing the code into that new project should enable the Java source locator to then find it when needed.
Piotr SmolinskiMemberYou mean also not to make project dependencies.
Yes, it is possible, cause Eclipse looks up source code in any project.
But it is workaround. My idea is to add such feature to MyEclipse.
In AS configuration we attach additional libraries as CLASSPATH prefix and postfix. Why don’t we add server source archives? Eclipse has the feature of remote java process source browsing (see mentioned remote debugging configuration).
Other idea is that MyEclipce could register and use such remote debugging configuration once (with fixed remote port). I noticed that AS debugging uses other debugging port in each session. In such situation we could add server sources to debugging configuration only. -
AuthorPosts