LabKey development in Eclipse

LabKey Support Forum (Inactive)
LabKey development in Eclipse Andy Straw  2015-03-10 13:54
Status: Closed
 
Regarding debugging a running LabKey instance, that's pretty straightforward. I might miss a step here, so let me know if this doesn't work for you.

- Start your tomcat instance with the jpda command-line option. For example, I use this command line:

catalina.sh jpda start


- Tomcat will start up with its JVM listening to a configured port for debugging commands. I think the default is port 8000 - at least, that's the port I use.
- In Eclipse, create a new Debug Configuration. Make it a "Remote Java Application". Name it whatever you want. On the "Connect" tab of that configuration, enter the host (mine is "localhost") and the port that the tomcat JVM is listening on (8000 for me). Hit "Apply" to save that configuration. Then hit "Debug" to start debugging.
- You can set breakpoints in the LabKey source, or if you're writing your own Java modules, you can set breakpoints in your source.

That's it.

Andy