Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to open debugger port in IntelliJ

Unable to open debugger port in intellij. The port number 9009 matches the one which has been set in the configuration file for the application.

<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" native-library-path-prefix="D:\Project\lib\windows\64bit" classpath-suffix="">     <jvm-options>-XX:MaxPermSize=192m</jvm-options>     <jvm-options>-client</jvm-options>     <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>     <jvm-options>-XX:+LogVMOutput</jvm-options>     <jvm-options>-XX:LogFile=${com.sun.aas.instanceRoot}/logs/jvm.log</jvm-options>     <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>     <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>     <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>     <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>     <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>     <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>     <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>     <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>     <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>     <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>     <jvm-options>-Dosgi.shell.telnet.port=4766</jvm-options>     <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>     <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>     <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>     <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>     <jvm-options>-Dfelix.fileinstall.debug=1</jvm-options>     <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>     <jvm-options>-Dorg.glassfish.web.rfc2109_cookie_names_enforced=false</jvm-options>     <jvm-options>-XX:NewRatio=2</jvm-options>     <jvm-options>-Xmx2048m</jvm-options>   </java-config> 

Configuration in IntelliJ:

enter image description here

When I try and enable the remote debugging in for this application it comes up with the following error: enter image description here

like image 407
MindBrain Avatar asked Oct 09 '12 04:10

MindBrain


People also ask

How do I enable a debug port?

In the Integration Nodes view in the IBM Integration Toolkit, right-click the integration server with which you want to work, and click Launch Debugger. Click Configure, and enter a port number. Click OK to enable debugging on the selected port, and attach the debugger to the selected integration server.

Why my debugger is not working in IntelliJ?

To solve this, simply remove the jar of the debugged module from all modules' dependencies in the Project Structure. If you do not know which modules have the debugged module jar as dependencies, you can use some tools (Eg. Sublime Text, bash, ...) to search for the module name which is stored in Intellij *.

How do I change the debugging port in IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Debugger. In the Built-in server area, specify the port where the built-in web server runs. By default this port is set to the default IntelliJ IDEA port 63342 through which IntelliJ IDEA accepts connections from services.


2 Answers

You may have to change the debugger port if your port is already used by another program. To do so:

  • Run
  • Edit Configurations
  • Startup/Connection tab
  • Debug
  • Change the port here

Or, maybe in other versions:

  • Run
  • Edit Configurations
  • Remote > Remote debug in the list on the left
  • Configuration tab, Settings section
  • Port: change the port here
like image 69
Pleymor Avatar answered Sep 30 '22 15:09

Pleymor


Add the following parameter debug-enabled="true" to this line in the glassfish configuration. Example:

<java-config  debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" debug-enabled="true"   system-classpath="" native-library-path-prefix="D:\Project\lib\windows\64bit" classpath-suffix=""> 

Start and stop the glassfish domain or service which was using this configuration.

like image 33
MindBrain Avatar answered Sep 30 '22 13:09

MindBrain