IntelliJ Remote Debug does not work at times - intellij-idea

I am using IntelliJ for development and remote debugging of my OSGI code. Most of the time it works. However, at times I am facing the below issue.
IntelliJ connects and the code stops when running; however, I do not see any values at my breakpoint.
Once I could resolve this problem by removing a swap file. Another possibility is a slow resync between my memory and file values.

I restarted my OSGI service and it seems to have resolved the issue. Any details on the internals will be useful.

Related

How to edit and debug OAF java code in IntelliJ IDEA

I agree that JDeveloper provides some unique ADF-specific functionality, but when it comes to work with java code, IntelliJ IDEA works better for me. Can I move java-related operations to IDEA?
Setup
Create IDEA project from existing sources, setup source folders and connect libraries.
Setup IDEA run configuration. "Listen to remote JWM" means that IDEA will act as a server and Jdev will connect to it as soon as it starts running. It is good if you need to debug processRequest() method - debugger must be connected immediately. I chose "JDK 1.4.x" because it looks closer to VM parameters which Jdev uses when it starts debugging (you can look at those is Jdev log while debugging).
Setup Jdev as a client. Append VM options from IDEA to your existing options.
Running
To start debugging, first, run IDEA run configuration with green bug button, and second, run Jdev with green play button.

<BEA-160228> AppMerge failed to merge your application

Got this dreaded <BEA-160228> & ToolFailureException when deploying spring-boot 2.x app on weblogic 12.1.x multiple times. Solved one with some package guesswork in <wls:prefer-application-packages>, but got another again each time we add new dependencies.
I know there's some thread asking this already, but it's usually very specific to each dependencies, i need different perspective on this.
Is there a way to debug/analyze what happened inside weblogic AppMerge process?
So we could exactly pinpoint what library caused this.
I've tried enabling debug deployment options, but didn't see any clue on the logs

Intellij and Apache Tomcat not updating

I have a project going on for a couple of months now using a Spring MVC framework. For developing I am using an Apache Tomcat 8.0.17 with an exploded war file. Everything worked well since yesterday. Now when I change my Java Files the changes are no longer visible. I can even throw runtime exceptions and stuff like that (I always restart the tomcat server). The only way to "update" my code is to rebuild the whole project (Build --> Rebuild Project) which is quite time consuming and very annoying.
I did not change anything in the configuration nor updated Intellij IDEA or the Tomcat Server.
I could fix this by manually deleting all the files in the following folder:
%userdir%/.IntelliJIdea14/system/tomcat
After a full rebuild the updateing process works perfectly again.
Use this is VM Options:
-Dcatalina.home=%tomcat_folder% -Dwtp.deploy=%tomcat_folder%/webapps -Dcatalina.base=%tomcat_folder%

Import of new play projects into IDEA via build.sbt hangs

I'm using the current release of the Play framework. After having created a new project via activator new foobar, I tried to import it into IntelliJ IDEA (with installed Scala plugin) by importing the project's build.sbt file.
IDEA/SBT then downloads the dependencies but is always stuck here (even after hours nothing happens):
SBT: [info] downloading http://repo1.maven.org/maven2/org/scalaz/scalaz-core...
Any help is appreciated.
I have not personally experienced that kind of hanging behavior, but here are a couple of thoughts.
I see that this library is about 1MB. (I'm not sure on the exact version, but I picked a recent one: http://repo1.maven.org/maven2/org/scalaz/scalaz-effect_2.11/7.1.0). Are you on an unusually slow connection? Others have reported the hanging when downloads are slowly taking place. See https://stackoverflow.com/a/12605068/2308858.
You can try clearing your ~/.ivy2/cache folder (this has fixed things for me before). If on Windows look for .ivy2/cache near your home folder.
I've noticed that sometimes SBT does not give insight into what it's doing, often because it is suppressing otherwise helpful output. Check out http://www.scala-sbt.org/0.13.5/docs/Howto/logging.html for some options on how to see more details or change the logging level.
Update: See second comment on original question for additional details.

How to enable hot swap in intelliJ

I want to work on intelliJ on my webapps and I don't know how to hot swap code while working.
For example while I was working in Eclipse when I edited jsp files Eclipse automatically, instantly swapped the file so when I refreshed the page my changes were there
When I change class code in Eclipse it worked a bit longer because he republished the app but did it automatically and instantly.
I saw that intelliJ in the runtime configuration has an option 'how class swap'. I did check it but nothing is happening. I had tried compile, make, save and everything else and nothing is happening. I had to reload the app and I had to do dis manually. Secondly intelliJ reloads EVERY application in my webapp directory. I have them a lot so it taking ages. how can I turn on hot swap?
Hotswap only works in debug mode. So you need to connect to your webserver through a debug configuration. Then, after compile either the project or at least the class with the modifications, IntelliJ tries to hotswap that class.
This only works for minor changes. For example, creating new methods on the fly is not possible using this way.
Hotswap works with exploded artifacts on Update action. If it doesn't work with your project, contact support for help and provide the project to reproduce it.