Remote Debugging

Remote Debugging

Assumptions

Local tomcat instance on machine

Eclipse installed on machine

Ability to deploy and run webapps on local tomcat instance

 

Steps

1.  Start tomcat in debug mode

Command Line

      Navigate to [tomcat_base]/bin

            Run command:

                  catalina jpda start 

      *This will start the debug server listening on port 8000.  If 8000 is unavailable you can specify with extra arguments. See attached document 1.

       

Windows Service

       Add the following lines to Java Options under Configure Tomcat - Java tab

      -Xdebug
      -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000


2.  Create Debug configuration in Eclipse

      Run ->  Debug Configurations...

            

      1. Select the project you want to debug. If you want to debug any dependencies of that project you will need to ensure the source code for that project is imported into eclipse.

      2. Ensure Standard (Socket Attach) is selected

      3. Enter host location

      4. Enter Port. Default from above steps is 8000.

 

3. Attach Debugger to running instance of Tomcat

  • Select 'Debug' from above dialog.

4. Create desired breakpoints and open Debug Perspective of Eclipse

  • Create breakpoints by either double clicking, or rightclick ->toggle breakpoint  of left margine of source code.
  • Open debug perspective from Window-> Open Perspective -> Debug

 

Debug Perspective

            

  1.  Shows that Eclipse is currently connected, you can see all running threads
  2.  Quick button to open view

 

 

 

 

 

Hints:

  • Set breakpoints by double-clicking the left margin of Eclipse editor, or by rightclicking the margin -> toggle breakpoint.
  • Clear breakpoints after making changes, this avoids 'ghost breakpoints'  (there is a clear all button in debug perspective -> breakpoints tab).
  • Ensure that the code you are debugging on the server is up-to-date with what is in your editor.

 

Extra Documentation

 

    • Related Articles

    • Remote Server Decommission Process

      Remote Server Decommission Process The purpose of this document is to track the process for decommissioning a FullCount remote server as part of the transition for the client to be centrally hosted or if the client is leaving FullCount. The first ...
    • Remote Deployment Process - Java

      Deployment Process Determine if a valid argument has been passed in Only continue if downloadOnly, postDownload, fullDeployment, handleSuccess, checkHash, verifyApplications passed through. Lock file to stop deployment from running more than once ...
    • Run Remote Deployment Process - Java

      Remote Server Configuration This has already been completed for all existing remote servers. Java 1.8 installed Tomcat located at /srv/tomcat XE database installed and running with fc_obj_owner user Directory /home/deployment exists Database backup ...
    • Scheduled Jobs on Remote Servers

      Scheduled Jobs on Remote Servers The tables below contain descriptions and schedules for regularly scheduled jobs on remote (i.e. at a customer's site) FullCount servers. This article does not apply to central FullCount servers (i.e. fcadmin01, ...
    • Overview of Deployment Process for Remote Servers

      Overview of Deployment Process for Remote Servers Introduction The process for updating the Touchscreen and Back Office applications is known as the deployment process. The deployment process is only used for updating applications and databases on ...