Search |
||
Debugging SJS AS 7Posted by gsporar on June 5, 2006 at 12:11 PM PDT
Version 5.0 of the NetBeans IDE has great support for version 8 of the Sun Java System Application Server (SJS AS). But what if you are using version 7 of SJS AS? The IDE can still do plenty for you, including debugging. For the test shown below, I used the 2004Q2UR4 release of SJS AS 7.1. The first step is to start SJS AS in debug mode. This is easy enough to do. From the admin console, go to the server settings page and check the Start in Debug Mode option.
Then just stop and restart the server. That will start the server's JVM with the following flags (these are the default values):
-Xdebug
-Xrunjdwp:transport=dt_socket,
server=y,
suspend=n,
address=2646
-Xnoagent
-Djava.compiler=NONE
The second step is to create a project within the NetBeans IDE. This will give the IDE a way to understand where your source code is, the required classpath, etc. For this example I used one of the sample projects that is included with SJS AS 7.
The third step is to attach the IDE to the server's JVM. Choose Run > Attach Debugger. In the Attach dialog verify that Socket Attach is selected and that the Port number is 2646. Then click OK. After the IDE attaches to the JVM you are ready to debug. You can set breakpoints by opening the source files in the project and using Run > New Breakpoint. »
Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|