I am new to IntelliJ and I am trying to set up environment. I use latest version of IntelliJ and Tomcat. When I make an api request using Postman, the breakpoints on IntelliJ are not being hit. I have configured Tomcat locally and when I run the server in debug mode I do not get any error and the application runs as expected. But I want to debug my application and breakpoints on IntelliJ do not work. Any help will he highly appreciated.
Resolved: I deleted the entire project and set it up from scratch. And this helped.
Thanks everyone for your suggestions:)
Related
My originally question has been marked as duplicate as this question and asked to ask a new one. So here I repeat, I am not looking for a remote debug solution. What I am asking is how to debug WAR inside eclipse just as a JAVA application. Following is my original question.
I have seen many online tutorial explaining how to use eclipse to do remote debug of WAR file.
But what I want to know is how to do the debug inside eclipse just as debugging a JAVA application? I have Tomcat 7 configured in my eclipse as a server. And I have tested it with a sample servlet program successfully meaning I can set breakpoint in the source code and run into it.
My WAR application is built by gradle. I have imported the gradle project into my eclipse and build it ok inside eclipse by running gradle task inside "gradle tasks view". I added the project into the server. However, when I try to use "Debug as > Debug on Server", it fails and the breakpoint is not get hit. Anyone could share the experience to debug WAR inside eclipse?
I used a merge tool to merge my code with the upstream branch which created a .orig file for one of my java classes. After verifying that everything was working fine I saw not need to keep the .java.orig file around so I deleted it.
Now whenever I try to deploy to tomcat from eclipse I get the following error:
'Publishing to Tomcat v8.0 Server at localhost..' has encountered a problem.
Resource '.../MyClass.java.orig' does not exist.
I've tried removing all applications off the server and removing the server from eclipse and then recreating it but to no avail.
I'm running out of things to try and I'm not sure what dependency tomcat thinks my project has on the .orig file. Any help is appreciated.
Ok so rebooting my machine seemed to have fixed the issue I was able to start tomcat normally after that using the same eclipse workspace. I'm not sure what the underlying issue actually was but the restart seemed to fix it.
I'm working with a spring based project in java 1.6. I have a remote debug configuration to local tomcat server which worked without problems. Today I have encountered a problem with it. I place breakpoints in my code but they have not the valid symbol and are ignored while debugging, I have no idea why. I tried to clean/rebuild the project , invalidate cache but no effect. Any ideas?
How do you connect to tomcat procces?
From Intellij debug button, or do you start tomcat manualy, with debug keys in tomcat's proccess?
Are you 100% sure, that this line of code should execute? Maybe it makes sence to log anything on that line of code, so as too see that a problem is definatly in debug-connection?
I am working on an academic project using Eclipse 3.X , jsp's, servlet's etc. The server i chosed to deploy my application is "Tomcat 6.0".
when i change any of my code in the application, i am facing problem with running the application. the changes in the code are not showing any affect even though i restart the server. the changes only get affected, if i restart my eclipse. i tried lot of ways by googling about integration of eclipse with tomcat but nothing worked?. I always have to restart the eclipse, to see my changes.
Please help me with this issue.
thanks in advance.
You should simply be able to use the "republish" feature after saving/building.
1, If the development path and deployment path is the same dictionary, make sure that the "Build Automatically" is checked, it's in "Project->Build Automatically", it can help you deploy the files which are changed.
2, If the development path and deployment path is not the same dictionary, you can write an ant task to deploy project.
if u are running in eclipse it is running the tomcat server of eclipse so for changes to be affected it should be refresh so u have to restart eclipse better way is to use outside eclipse and use localhost and tomcat manager u can restart and can see the changes or use ajax
I'm currently using jboss/maven/eclipse to debug a web app. I've enabled remote debugging in the jboss run.conf file and then use mvn war:inplace to compile and with that I can successfully add a breakpoint and step through code.
However I remember a while back using Tomcat I was able to hotswap or hot-replace a java class by making changes, saving it and then having the debugger re-enter the method. I'm thinking there has to be a way to do this but don't know how.
You can try JBoss Tools Eclipse plugin, or if all else fails, JRebel (however, its not free).