Process not terminated when stopping debug

Answered

IDEA 2019.3.5

When I hit the red square button to stop the debug job, I only got message "Disconnected from the target VM, address: '127.0.0.1:8351', transport: 'socket'" but the application still run, I have to terminate it by task manager which is very inconvenience.

https://i.imgur.com/HDWBaOy.png

 

Also ,during the debug, I can not get in to the breankpoints.

What I have treid:

 

1 restart idea

2 invalidate caches and restart

3 re-import maven project

4 change to external maven instead of the bundled version.

5 change to community 2020.1

 

None of them solve the problem.

 

7 comments
Comment actions Permalink

I am also having this issue.  I have enabled the option "Kill the debug process immediately" also.

Company provided version 2019.2.1

0
Comment actions Permalink

What exactly happens when you stop the debugger? What specific run/debug configuration do you use?

Can you share the jstack output for the process you debug and for the IDE process per https://intellij-support.jetbrains.com/hc/articles/206544899 ? You can upload the files at https://uploads.jetbrains.com .

With the kill option enabled does it get killed or does it hang? A short video may also help to understand what happens.

0
Comment actions Permalink

Thank you for the questions:

Q1:  The console prints out this message:  "Disconnected from the target VM, address: '127.0.0.1:61666', transport: 'socket'" and hangs

Every time it hangs, I have to manually run netstat -a -n -o | find "8080" and locate the PID on the line labelled

"TCP    0.0.0.0:8080    0.0.0.0:0     LISTENING      <pid>"


Q2:  When i run my application in debug mode, I use IntelliJ's debug function.  However, I have defined the Run configuration as a Maven process which equates to

mvn spring-boot:run -Dspring-boot.run.profiles=local,header-security

I'm not sure what information you need in terms of the debug configuration, so I don't want to supply you with a whole bunch of superfluous information.

Q3:  I've never done this before so I hope I am providing the correct data... Upload id: 2020_09_24_835rNccjhyS2ia3n (file: Nick_Brewer_jstack_ide_20200924.txt)

Q4:  No.  the process does not get killed.  It hangs.  Sorry, I cannot attach a video because I can't control what content it shares and it contains data protected by an NDA.

 

0
Comment actions Permalink

Does it help if you use Spring Boot run/debug configuration instead of using Maven? https://www.jetbrains.com/help/idea/run-debug-configuration-spring-boot.html

0
Comment actions Permalink

yes.

 

... yes it does.


... i feel dumb.

0
Comment actions Permalink

Hi guys, I solved it by setting:

 

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>false</fork>
</configuration>
</plugin>

 

Especially the `<fork>false</fork>` 

0

Please sign in to leave a comment.