Debugging a Server Side Code...????

Discussions

EJB programming & troubleshooting: Debugging a Server Side Code...????

  1. Debugging a Server Side Code...???? (1 messages)

    Hello Everyone...
    I m wroking on a portal and using JRUN as the Application Server...with its JRUN WEB SERVER....can anyone tell me how to debug the Code...when using the above...as i have never debugged a server side code with a Debugger....if anyone has performend debugging with the above configuration please comment...

    Thanks.


    Farhan.
  2. Debugging a Server Side Code...????[ Go to top ]

    I've not used JRUN, so this may not apply (sorry!).

    For WebLogic and Netscape Application server I tend to use really basic techniques:
    1) Compiling my project with the javac "-g" option, and editing the application server startup script to use the JDK-bundled jdb command-line debugger to start the program instead of "java" or "jre." As an alternative, you can also attach to the running java process with a command-line jdb invocation. The app server startup script is usually just a shell script or batch file you can fiddle with.

    2) Since application servers are multithreaded processes with a lot going on at once, I've tended to reply more on logging information than on debuggers. In the simplest cases, println() calls. Printing out thread id and timestamp along with the values of variables helps... often the app server has a logging facility you can use instead.

    So I usually set up the logging, tail the app server's console output or log file, and point either a browser or a web load generation too at it.

    If you are working on an NT machine, I've seen people set up Visual Cafe and other IDE debuggers... but most of my colleagues rely on the logging/tracing approach for server-side java debugging.