I have a java class and I need to debug it (put breakpoints and continue using F6). I am using ANT script to init, build, deploy and run the code. I am using:
set ANT_OPTS=%ANT_OPTS% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432
in Eclipse
Toolbar >> Run >> Debug Configurations >> + >>
Give the values:
Name: Debug_Ant
Project: active-eclipse-project
Host:localhost
Port:5432
Steps:
1)Configure remote java debugger with local host as name, port address as 8000(or whatever your system's port address will be)
2)Create a batch file and keep that in bin folder of your tomcat(this step is required when we want to debug remotely keeping server/s in same system).
in batch file you should keep this line:
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
catalina.bat jpda start
after this keep a break point in your java code, and debug this remote debugger. it will work.
Happy Coding !!