Remote debugging with Tomcat: Does Not Stop on Breakpoints
I can make changes to Java class and/or resources (web.xml, jsp, etc) , do either Build Module, or Debug and the changes show up on Tomcat.
However, debugging is not working.
I have tried a number of things, but let's start with the basic default configuration.
1. I defined a Local Tomcat6 application server on port 18080 and a startup page
this works
2. Set the Web Facet for deployment. this works
3. Logs work
4. For the Startup script, I selected use default, which is pre-defined as the following:
C:\opt\tomcat\bin\catalina.bat run
The application starts up and says
Listening to the connection, address: '127.0.0.1:4000',transport:'socket'
Then my webpage is launched and does come up..
But.. my breakpoints in the code are ignored.
Any hint on which additional setting is missing?
Edited by: Stephen Boesch on Apr 22, 2008 8:59 AM
Please sign in to leave a comment.
Are your breakpoints located in Java files or in JSPs?
Which icon are displayed for your breakpoints after starting Tomcat: red
circle, red circle with 'tick' mark inside it or red cirle with small
green circle inside it?
--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi,
The breakpoint is the normal full red. It is on a normal, executable code inside the servlet service() method .
Breakpoints are being properly recognized on simple standalone classes with main() in the same project, when I run them independently of Tomcat. There's something going on with the Tomcat / debugging configuration .
thanks
Anyone want to get some points for this ;)
I ran out of time on this for now.
For local tomcat debuggin, I have put in the tomcat bootstrap class, classpath, and jvm parameters, and run it just like a standalone java program. It is a primitive way to do it BUT IT WORKS.
Still, that way won't suffice for remote debugging.. So, I will still look forward to help on why this is not working.
My script to start Tomcat looks like this:
set JPDA_ADDRESS=5005
set JPDA_TRANSPORT=dt_socket
call catalina jpda start
This will start Tomcat in Debug-Mode. In IDEA, I configured a debug session under Remote (not Remote Tomcat, but just Remote). Connect to Port 5005 and select Socket as Transport.
If I start the Debug-Session in IDEA (after starting Tomcat manually) then the breakpoints are honoured.
In this setup, Tomcat is never started and stopped by IDEA. I start it one time manually and after a compile (and auto-deploy by IDEA), Tomcat will reload the application automatically.
I hope I could help.
Regards
Hans
I see your Tomcat is started with "catalina run". Maybe you should change that to "catalina jpda run". I am not sure but maybe it is worth a try
Thanks, I did try that actually before anything else (even before the default catalina run..)
cheers.
Hi Hans,
Thanks v much for this input. It sounds like a good option. I will post back after I set it up and give it a whirl.
The remote debugging as a standalone app (not using the built-in tomcat) is working fine. One downside is I don't get to see the log files: at least, I have not figured out how to do so yet.
I also have encountered this same behavior. It used to work back when running Intellij 2018 or earlier with Tomcat 8.0. I am now running Intellij 2020 with Tomcat 8.5.15. I don't have breakpoints muted. It just never stops on a breakpoint. I am using java 1.8.0_101.
Please submit a ticket at https://intellij-support.jetbrains.com/hc/requests/new with the sample project, configuration screenshots and the exact steps to reproduce it.
I realized after I added my comment that this post was from 2008 and that I would submit a new ticket. I thought I commented on that, but I guess I didn't.
New ticket: Debugging Tomcat does not stop at breakpoints