[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to attach a remote debugger  XML
Forum Index -> Development - Code Snippets
Author Message
jmewes

Active

Joined: 19/11/2017 06:20:00
Messages: 16
Offline

With those steps a remote debugger can be attached on MacOS / Eclipse:

(1) Start the Tomcat server in debug mode

Code:
 export JPDA_ADDRESS=8000
 export JPDA_TRANSPORT=dt_socket
 
 catalina.sh jpda run
 


(2) Set a breakpoint in the source code

(3) Create and launch a debug configuration

- Open the menu "Run > Debug configurations"
- Create a new configuration in the "Remote Java application section"
- Enter e.g. hostname "localhost" and port "8000"
- Start the debugging by clicking on the "Debug" button

(4) Trigger the breakpoint

Then open the application and navigate to the location of the breakpoint.
Now the debugger should kick in and enable stepping through the source code.


Also see
- https://blogs.mulesoft.com/dev/tomcat-tcat-server/debugging-your-tomcat-webapp-with-eclipse/
- http://www.captaincasademo.com/forum/posts/list/510.page
[WWW]
jmewes

Active

Joined: 19/11/2017 06:20:00
Messages: 16
Offline

The same steps can be applied with IntelliJ as well. Here is how the debugger can be started there:

- Open the menu item "Run > Edit configurations"
- Click on the "+" icon
- Add a "Remote" configuration
- Enter port 8000
- Appy and save
- Select the new configuration and start the debugger by clicking on the "Debug" icon
[WWW]
 
Forum Index -> Development - Code Snippets
Go to:   
Powered by JForum 2.1.6 © JForum Team