My dev environment
- Max OS X 10.9.2
- Java 1.8.0
- Tomcat 8.0.3
Set up
Tomcat
- Create a new file called <Tomcat install directory>/bin/setenv.sh. (This file will be automatically read by catalina.sh)
- Add the following content to setenv.sh. 8080 is a port number for Tomcat. Please specify for your tomcat.
- CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8080,server=y,suspend=n"
- Start Tomcat normally using startup.sh.
IntellJ
- Select "Run -> Edit Configuration" then "Run/Configuration" screen is open.
- Specify "Name" like "Tomcat".
- Specify "Port", which is the same number as Tomcat's port numer
Debug
- If you want to start debugging on IntellJ, just select "Run -> debug 'Tomcat'".
- If IntellJ shows a message like below, you are already connected.
- Connected to the target VM, address: 'localhost:8080', transport: 'socket'
- Now you can debug. Please refer here for more detail about debugging by IntellJ.
No comments:
Post a Comment