• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

Starting tomcat in Debug mode

July 30, 2012 By j2eereference Leave a Comment

Steps to start Tomcat in Debug mode

Here is the steps you have to follow for starting Apache tomcat in debug mode

Step 1 :

Go to your bin tomcat bin folder . Path will be something like the following

C:\apache-tomcat-7.0.27\bin

Create a file with the following contents and save as “setenv.bat”

set JPDA_ADDRESS=7777
set JPDA_TRANSPORT=dt_socket

Here tomcat will start up and it will open debug port 7777.

Step 2 :

Now you go to command prompt and type the following command to start the tomcat in debug mode

 

Apache tomcat will start in the debug mode.

Another way to replace step 2

Create a .bat file which has the below contents

catalina.bat jpda start

In this case you can start Tomcat by just clicking on the created bat file .

Now you can open your IDE and configure Remote Debug on your host

Configuring remote debug in eclipse

Click on the Debug icon >> Open Debug Dialog

 

On click of Open Debug Dialog  you will get  a dialog box for doing the configuration

Mention the following

Project Name – You can mention any name

Host : You can give localhost if the Apache tomcat server is running locally.

Port : You have to mention the debug port on which Tomcat server running, In our example we have configured 7777.

Now it is possible to catch breakpoints once you run the application.

Related Posts

  • Text Blocks – Feature added in Java17
  • Record – The new feature added in java 17
  • What is Sealed Class
  • Features added in Java 17
  • Java Buzzwords
  • Anonymous Inner Class in Java
  • Network Programming – java.net Package
  • Java Regular Expressions
  • Method Local Inner Class in Java
  • URL Processing in Java

Filed Under: Core Java

Reader Interactions

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • What is parallel Stream
  • reduce method of the Stream class
  • Difference between the findFirst() and findAny() method
  • intern() method of String class
  • SOLID – Five principles of object-oriented software design
  • Java Coding Best Practices
  • How to use lambda expression effectively
  • Enhanced pseudo-Random Number Generators in java17
  • How to use Foreign-Memory Access API
  • Pattern Matching for instanceof
  • Text Blocks – Feature added in Java17
  • Record – The new feature added in java 17
  • What is Sealed Class
  • Features added in Java 17
  • Java Buzzwords

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.