← Back to team overview

dhis2-devs-core team mailing list archive

debugging in eclipse

 

Hi,

just sharing some experiences on how to do debugging of java code in
eclipse - some of you might know this already.


First set up a debugger in eclipse:

1. Right-click any project in eclipse, e.g. dhis-web-dataentry, and go to
"Debug As" > "Debug Configurations".

2. Right-click "Remove Java Application" and click "New". Leave settings
under Connect is it is.

3. Click "Source" tab, then "Add", then "Java project", then "Select All"
and "OK".

4. Click "Apply".


To start debugging a web project from the command line:

1. Navigate to a web project directory and execute "mvnDebug jetty:run". It
will say "Listening for transport dt_socket".

2. Go back to eclipse, find the debugger and click "Debug".

3. You can now define your break-points anywhere in the code. Watch the
breakpoints kick in while you use the web application.







Lars