Intellij debugger does not stop at breakpoints

I have to do something wrong. I am new to intellij. Transition from eclipse. I have a JAX WS application that runs on weblogic. The artifact for deployment is an ear file. I'm struggling to get a debugger when working with intellij. I have a final edition. I created a start-up debugging configuration, but it just goes through the code and does not stop at my desired location. The debugger shows a red dot without a check or cross.

Change I am running a local startup / debug configuration.

Here is a screenshot of my startup / debug configuration.

enter image description here

Here is a screenshot of the launch / connection

enter image description here

+10
source share
3 answers

I realized what my problem is, and I think the problem is specific to me and the nature of my application. Actually, I have to call it a problem caused by myself. Let me explain the nature of the events.

  • I use eclipse to develop and install a weblogic instance locally. My application needs a coherence cache server, and I have several other JVM parameters that I pass when the domain starts. So I added a line at the beginning of the $DOMAIN_HOME/bin/setDomainEnv.sh , for example,

    JAVA_OPTIONS="- Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.wka=devmachine and blah blah blah

  • I switched to intellij and started working on this project, and then configured the weblogic plugin and started the configuration, etc.

  • I noticed that intellij adds JAVA_OPTIONS to the launch / connection tab in the Startup / Debug Configuration , e.g.

enter image description here

  1. However, the JAVA_OPTIONS that was passed to intellij was not used by weblogic. I believe this was overridden by what was in setDomainEnv.sh, so I saw the following logs.

java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) Starting WLS with line: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -client -Xms512m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/Users/dparupud/omw/oracle/middleware/weblogic_10.3.6/wlserver_10.3/server/lib/weblogic.policy -Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.wka=devmachine blah blah blah......

  1. When I went and deleted JAVA_OPTIONS from setDomainEnv.sh and restarted the server from intellij, I saw the following log

starting weblogic with Java version: java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) Starting WLS with line: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -client -Xms512m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/Users/dparupud/omw/oracle/middleware/weblogic_10.3.6/wlserver_10.3/server/lib/weblogic.policy - agentlib:jdwp=transport=dt_socket,address=127.0.0.1:65501,suspend=y,server=n

Now the log has shown that the jdwp agent is in action. I noticed that I didn’t see this particular magazine before I asked the SO Question, but I thought that maybe IntelliJ was doing something inside the cover because JAVA_OPTIONS was being passed and intellij does not allow you to bother with it (this only for reading).

I think I can either pass all my jvm parameters either from intellij, or add the jdwp agent information to setDomainEnv.sh.

Now I can debug.

+8
source

To configure WebLogic debugging on IntelliJ:

  • Find WebLogic Debug Port: This is the port in WebLogic that is open for debugging. The default debug port is 8453, but if it has been changed, you can find it in the config.xml file (in the config folder in your domain’s house) or in the setDomainEnv.sh file for DEBUG_PORT (I assume it is .sh and not. bat as you seem to be using Mac OS X).

  • Remote debugger configuration: go to the configuration and select a new one, then select "Remote", enter any name that is reasonable, and below it (orange block in the image) enter the value that you found in 1. For the host (green block) type localhost [side of note: you can connect to the remote server by typing the name or IP address of the server if the debug port is open].

  • Start the debugger: Run the configured debugging configuration, the debugging window will open, and if the port is right, it will say that it is connected to the remote host and you are debugging it well.

IntelliJ remote Debugger

- Change 1 -

Read your question again, skipping the part that you already installed the remote configuration.

Perhaps there is no breakpoint, if your program is multithreaded, the breakpoint may not fall into the current thread in which you are located.

There is a crash in the debugger when you work with a remote configuration, where you can select a thread for debugging.

- Change 2 -

Added image for remote debugger settings

+4
source

Removing the configuration and creating a new one solved this for me.

0
source

Source: https://habr.com/ru/post/986693/


All Articles