Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run project from IntelliJ IDEA because of jdwp error

I have a project in IntelliJ IDEA I want to run locally. When I click its debug button it says:

ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
Disconnected from server
Error occurred during initialization of VM
agent library failed to init: jdwp

When I click the run button it works. What is the matter?

like image 389
Elbek Avatar asked May 13 '11 14:05

Elbek


3 Answers

This is probably too late to help you, but maybe it will help somebody else. The answer is based on a support forum posting by Aleksei Sosnovski.

This can happen when your JAVA_OPTS contains two -Xrunjdwp arguments. E.g., one of these arguments might come from the server start script invoked by IntelliJ to start the container, and another may be added by IntelliJ itself. You can check by looking at JAVA_OPTS in the log when launching the container without debug. If you see an -Xrunjdwp argument, just find where it is set in the container startup script, and remove it.

like image 185
kc2001 Avatar answered Nov 09 '22 00:11

kc2001


I guess you already are debugging the server app? In this case it's not possible to connect another instance of debugger.

like image 44
Peter Knego Avatar answered Nov 09 '22 00:11

Peter Knego


Most likely the problem happens because you have specified the debugging options in the "VM parameters" field of your run configuration. Everything will work if you remove them.

like image 4
yole Avatar answered Nov 09 '22 01:11

yole