- This topic has 9 replies, 5 voices, and was last updated 15 years, 10 months ago by
vanesssa99.
-
AuthorPosts
-
watchmakerMemberHi,
I’m trying to debug JBoss 3.0.7 code using MyEclipse. My code is developed in MyEclipse but I use an ant script to build it. I have MyEclipse set up so I can start and stop JBoss from it. I’m able to debug client side JUnit classes but I’d like to be able to debug code running in JBoss.
When I attempt to set a breakpoint in this code I get the following error message:
Unable to install breakpoint in … due to missing line number attributes. Modify compiler options to generate line number attributes.
Reason: Absent line number informationThe compiler options for generating line number info are selected in MyEclipse. However, as stated above I’m using ant to build it.
In answer to the standard questions:
What operating system and version are you running?
Windows XP professionalWhat Eclipse version and build id are you using? (Help > About Eclipse Platform)
Version: 3.0.2
Build id: 200503110845– Was Eclipse freshly installed for MyEclipse?
Yes– If not, was it upgraded to its current version using the update manager?
N/A– Are any other external plugins installed?
Yes – checkstyle– How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
7What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
3.8.4What JDK version are you using to run Eclipse? (java -version)
1.4.2What JDK version are you using to launch your application server?
1.4.1What steps did you take that resulted in the issue?
See above – Try to insert breakpoint in code or generally debug server code.What application server are you using?
JBoss 3.0.7 with JettyAre there any exceptions in the Eclipse log file? (<workspace>/.metadata/.log)
NoThanks for any replies!
Riyad KallaMemberThe compiler options for generating line number info are selected in MyEclipse. However, as stated above I’m using ant to build it.
You need to adjust your Ant script, the settings in Eclipse have nothing to do with Ant and visa versa. Building your project via Ant is totally independent, you likely need to add the “debug=true” attribute to your javac task as well as adding all 3 debugging information flags.
watchmakerMemberThanks for your reply – that’s working now.
One question though – do those debug flags have a performance impact?
Should I remove them before building a release?
Riyad KallaMemberOne question though – do those debug flags have a performance impact?
Should I remove them before building a release?
If you are writing a game engine, yes they might, if you are writing a normal client app, I don’t think anyone will every notice… ever.
gopherCodeLeoMemberI have the same problem with debug=true enabled but I could not get the problem cleared can you please help me on the line posted earlier for the solution which says:
” add the “debug=true” attribute to your javac task as well as adding all 3 debugging information flags.
I am a new user of myEclipse and JBOSS with ant. Please kindly elaborate the steps.[/b]
Riyad KallaMembergopher,
Check out the Ant manual here: http://ant.apache.org/manual/index.htmlDrill down to the Ant Tasks > Core Tasks > javac, look at the “debug” and “debuglevel” arguments, the 3 information flags are “lines, vars, source”
evhiiiMemberHi,
I have same problem. I am building for WebSphere 6.0 using Ant. I have set debug=”on” and debuglevel=”lines,vars,source”. I cannot set a breakpoint on the code in my EJB project. The message I see is:
————————————–
Unable to install breakpoint in
com.ibm.websphere.samples.plantsbywebsphereejb.LoginBean due to missing
line number attributes. Modify compiler options to generate line number
attributes.Reason:
Absent Line Number Information
————————————–Here is my compile Ant task:
————————————–
<target name=”compile”>
<tstamp/>
<echo message=”PlantsByWebSphere Compiling…”/>
<javac srcdir=”${src}/PlantsByWebSphereEJB/ejbModule” destdir=”${bldPBW}” deprecation=”true” debug=”on” debuglevel=”lines,vars,source” classpath=”${prereq.classpath}” failonerror=”${failonerror}”/>
<javac srcdir=”${src}/PlantsByWebSphereWEB/JavaSource” destdir=”${bldPBW}” deprecation=”true” debug=”on” debuglevel=”lines,vars,source” classpath=”${prereq.classpath}” failonerror=”${failonerror}”/>
</target>
————————————–FYI, I am running:
OS: Windows XP
MyEclipse version 4.0
Eclipse version 3.1My computer is a ThinkPad 42p, 2GHz processor, 1GB of memory.
I have tried launching the server (server1, standalone deployment) from the IDE and also by external launch, attaching via remote debug. No difference in behavior.
I have been able to set JSP breakpoints, however.
Thanks in advance for your help,
Ed
Riyad KallaMemberTry: debug=”true”
evhiiiMemberIt turned out that my problem was the Ant task that builds the EJB jar includes the source. When the source is present, the EJBDeploy process in WebSphere recomplies the code (without debug) as part of the deployment process. Weird. Once I removed the .java files from the archive, I was able to debug my EJBs.
vanesssa99MemberThanks for your idea
-
AuthorPosts