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:
When I try and enable the remote debugging in for this application it comes up with the following error:
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.
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 *.
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.
You may have to change the debugger port if your port is already used by another program. To do so:
Or, maybe in other versions:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With