Reputation: 4373
I am trying to debug remote java application in Intellij but unable to get sucess, The steps which I am doing is
Run>Edit Configuration> Defaults> Remote
What is/are I am missing?
Upvotes: 2
Views: 567
Reputation: 521239
First, create a new Remote debugging configuration:
ALT + U + R
Take note of the port which IntelliJ plans to listen in Tomcat. On my setup the port is 8000
, which is the default and this should be fine for your setup as well. To change the Tomcat JPDA port, edit catalina.bat
(or whatever your startup script is) and find a line which looks like the following:
set JPDA_ADDRESS=8000
Second, make sure that you are building your project with javac -g ...
. The -g
option means that debugging information will be turned on in your Spring WAR.
Finally, when you start Tomcat, use catalina jpda start
, which will tell Tomcat to connect the debugger to port 8000. When you want to connect to IntelliJ then use ALT + SHIFT + F9 and select your remote configuration from the menu. Of course, you should add some breakpoints, without which it doesn't make much sense to be in debug mode.
Upvotes: 2
Reputation: 97148
You don't need to edit the defaults. You need to use the [+] button to create a new Remote run configuration and specify its settings.
Upvotes: 1