| Devtest Debugging Here's how to debug devtest clients using NetBeans:  
      In console window A, cd to the directory with the devtest you want to debug. Edit the build.xml file.
 Find the <target name="runclient" ...>.
  
        If the test runs with Java SE, inside the <java> or <javaWithResult> element add <jvmarg value="-agentlib:jdwp=transport=dt_socket,address=9009,server=y,suspend=y"/>.If the test runs an app client, inside the <exec> element before the first <arg> element, add <arg value="-agentlib:jdwp=transport=dt_socket,address=9009,server=y,suspend=y"/>.Save the build.xml.In NetBeans, open the class you want to breakpoint in (can be a JDK class). (Navigate > Go to Type... : enter the class name and choose the correct one if there are multiple.)
 Set a breakpoint.
Back in window A (still in the devtest subdirectory), run "ant all". After a bit it says the debugger is listening on 9009.
Back in NetBeans, connect the debugger (Debug > Attach debugger...) to 8118 and go. Hope one of the breakpoints is hit.
 To debug the server when running devtests:  
      Edit domain.xml. Find the <java-config> element under the <config name="server-config"> element.Change the suspend=n string to suspend=y.Start the server using asadmin start-domain --debug. You might also want to use --version.In NetBeans, set breakpoints and attach the debugger as above. |