Good support for debugging from language runtime and IDE can considerably reduce the time spent in debugging. Java runtime and Eclipse provide excellent support for debugging local and remote applications. To debug a remote application, launch it with debug parameters for JVM and connect the Eclipse debugger to it. You can then debug the remote application just as you would debug the local one, that is, set breakpoints, perform step operations, and inspect variables. You can also change variable values in the application when its execution is suspended.
In the next chapter, we will see how to develop JEE applications using EJBs and use the GlassFish server. Although this chapter explained the debugging of JEE applications deployed in Tomcat, you can use the same techniques in the GlassFish server.