I have installed IntelliJ IDEA and upgraded a web project to run with Tomcat. It works fine but after some time I have discovered that I'm not able to debug some code I add to the end of class. Because when I set a breakpoint in this code it marks as invalid. If I hover the invalid mark the warning message appears Warning: No executable code found at line xxx in class yyy.
The screenshot of the source code in editor when web application is running in debug mode:
Does anybody know why IntelliJ Idea can't find executable code there and how to set a valid breakpoint like the first one in the code that compiles and running?
When I have this problem, I go to menu "File -> Invalidate Caches and Restart". The problem is likely that the IntelliJ cache isn't up to date yet.
Related
Anywhere I break, when I hover on variable or try to evaluate, IntelliJ always report:
Method threw 'java.lang.ClassNotFoundException' exception even the variable exist
I tried to clear cache and restart the IntelliJ as well as refresh Gradle cache and rebuild the app. Nothing work. But the application itself did not crash and runs as usually, so I am pretty sure its Intellij problem. But I can't find any solution online.
Also, the file is a Kotlin file.
First, I forgot to mention, this error came up when I was in JRebel debug mode.
For now, none of the existing solution worked. But I did the following:
1. I upgraded to later version of intellij (2019.3). everything stop running and all sort of error came up.
2. I reverted back to the version I was using (2019.2)
3. then I did rebuild with default debug mode icon (little red bug icon) then with jrebel debug mode icon (rocket with a grey bug). Only Jrebel debug mode have that error message!
I still did not know why jRebel acts like that suddenly, but at least this is a piece of information that may help lead to better solution than what I would have to do now ---- use default Intellij debug mode.... which is very very slow....
So likely you may not even need to take any of the above step, but simply try to build with the Intellij Debug mode to see if it still work so to isolate out that if its a JRebel problem.
Could you please open a JRebel Support ticket and we can then take a closer look at the issue?
You can open a ticket either from the JRebel IDE plugin or by sending an email to support#jrebel.com
I am working on one simulator with netbeans IDE. I downloaded one simulator from their official website and it's install an running correctly in cmd.
I import existing project of one simulator into netbeans IDE and included all three libraries, so it have no error. But when i click on run icon, it gives me the following error.
So, as you see on the console tab(text with red marker), that's the error in which i need help. Thanks in advance...
Reason is you working directory in not correctly set in Eclipse for this project.
I was having same problem so I changed it.
Here is screenshot of my working directory. This Might help someone.
During the configuration of One with eclipse make sure that your run configuration path must be in synchronization with the arguments otherwise it will throws an error like you posted.
Steps:
Go to Run -> Run Configurations
After setting the proper configuration of one eclipse, Click on DTNSim present in core
Open Run Configuration Window
Click on Java Application-> Open Drag bar-> Click on DTNSim
Go To Arguments
Check Default and Others path:
It must be like the picture attached here!
One Simulator Working Window
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 trying to run CheckStyle 5.6 with Eclipse 4.2.1. but unable to do so.
Then i Saved the Sun Checks (Eclipse) with myConfig
Then I modified the properties as below , making empty block and need braces at error level in new config
Now in Code i have code like
if(true){}
When i save java file i was expecting it to show as error in "checkstyle violations" view
Check Styles is Enabled it for my project
but didnt get ... what am i doing wrong ??
Maybe "build automatically" is not activated in your Eclipse (in the menus under "Project").
Checkstyle only runs as part of the Build (triggered by the Checkstyle Builder).
I know this is a frequently asked question, but i have been searching for a solution for my problem online since yesterday and have not been able to find any!
I am using Eclipse Helios with Tomcat 6.0.2, when ever I try to debug my code using the tomcat and eclipse i am getting the error Source not found, this is the case for even the code that i have wrote myself and not just all the jar files
I have the java build path set up correctly, I am also using jdk1.6.0 and have this set up correctly as well so that is not the problem, it does show the code when i am debugging if i right click on the debug console and go to Edit Source Lookup.... Because this will show the source code just for that run of the debugger, I when into Run -> Debug Configurations and in the Java Application window i set it up to work with Tomcat and in the source tab I added my project and all the jar files but this does not work either! when i debug again and go into the Edit Source Lookup... it does not show me the project and jar files that I have saved in there
Does anybody have any ideas what might be happening?
Its actually very easy.Click on "Edit Source Look Path". You ll get the next popup where you need to click "Add"--> This gives another popup where you could click on "Java Project"---> THis leads to another popup where you can select your project which you are debugging and this is done! Hope this works fine.
I have solved my problem, well in a roundabout way. In my catalina.bat file I have added the line
set JAVA_OPTS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=5001,server=y,suspend=n %JAVA_OPTS%
below where the JAVA_OPTS are set, this will listen on socket 5001 for any debug requests. Then in eclipse, under Debug Configurations... i created a new Remote Java Application and set the port to 5001 so that Tomcat would pick this up. Now when i start tomcat using startup.bat, when the code hits a breakpoint it opens in eclipse and I can debug like normal
Hope this helps others that have this problem
Can you debug code in other projects?
if you don't know, create a new dummy project and try to debug it
if you still get source not found for all projects, then download a fresh copy of eclipse, link it to a fresh copy of tomcat and add your dummy project to see if this work.
Hope this helps