|Figure 3: Created New Remote Debug|
- This will create a new remote debug configuration for us. Let's name it as 'ode' and fill the Host field with 'localhost' and Port field with '8000'. Then click OK.
|Figure 4: Setting up Host and Port for remote debugging|
- The new remote debug is successfully created now. After the tomcat server is started, select 'ode' remote debug and start it by clicking icon in Idea. It will connect to the server via the defined port and you can start debug ODE now.
|Figure 5: Debugging ODE|
- Open catalina.sh script in the Tomcat_Home/bin folder and search for JPDA_ADDRESS, you will see JPDA_ADDRESS="8000" defined there. Change it to any available port and restart tomcat under JPDA debugger. The server will listen from the new address now.
|Figure 6: Edit the JPDA_PORT in catalina script|
You can also change this port (let's say to 8010) by giving,
- Now go back to the 'ode' remote debug and select 'Edit Configurations' to edit its configurations.
- To start tomcat, go to the tomcat home's bin folder and start catalina.bat file under jpda debugger as follows.
|Figure 10: Debugging tomcat in Different Port|