Debugger Overview

Radivoj Milin


Table of Contents

Introduction
Using the Debugger
Examine the Requests
About the Debugger

Introduction

The Enhydra Debugger is a small Enhydra application that allows you to debug your Enhydra application that is running in a Enhydra-Tomcat Servlet Container or Enhydra-Jetty Servlet Container.

  • Debugger for Enhydra-Tomcat Servlet Container interacts with EnhydraDebugger MBean witch represent the EnhydraDebugger Valve. EnhydraDebugger Valve is located in EnhydraDebugger.jar (placed in directory <enhydra_enterprise_root>/multiserver/lib/catalina/server/lib). EnhydraDebugger Valve must be defined in tomcat server configuration file (server.xml) in <Host> section:

    <Valve className="com.lutris.appserver.debugger.EnhydraDebuggerValve"/>

    to be started at server startup.

  • Debugger for Enhydra-Jetty Servlet Container interacts with Enhydra-Jetty Servlet Container directly, additional configuration is unnecessary.

The debugger also has the capability to debug third-party (non-Enhydra) servlets.

Figure 1. 

Using the Debugger

The first thing you need to do is start the applet. When started, the applet shows the status of the available Enhydra applications , and window with list of requests ( At this point there have not been any requests recorded, so the list will be empty. The applet does nothing further until one of the Enhydra applications is selected and "Update" or "Attach" buttons are pushed.

The "Update" button causes the applet to connect to the back-end to fetch a copy of the list of requests, which are then displayed. This is a one-time operation, and must be repeated periodically. Alternatively, the "Attach" button causes the applet to keep a connection open to the back-end. Requests are shown in real time as they occur. This connection may be terminated by the "Detach" button (as a safety feature, after several minutes the connection will automatically detach).

You must click on either "Update" or "Attach" to see the requests. "Attach" is recommended.

Examine the Requests

When you see a suspect request appear in the list, click on it. The right frame will show all of the information about the request. The information is split up into three tabbed panes. Use the links at the top of the frame to view the subsections.

The information shown should help you to track down the problems you are experiencing. We have found it useful to examine the incoming headers, incoming cookies, incoming parameters, result type, result code, and outgoing cookies.

About the Debugger

We at Enhydra hope you enjoy using the debugger, and that it helps you with your Servlet development. It has been extremely valuable for us and has saved us countless hours of debugging.

This is a work in progress. The source is available as part of Enhydra, an Open Source Java Application Server. Enhydra provides an application framework for writing web applications - this debugger is a small Enhydra application! We welcome support from developers in the Open Source community. Visit the Enhydra web site for more information.