If the file /bin/setenv.bat already exists, just modify that file and add -javaagent:path/to/applicationinsights-agent-3.2.4.jar to CATALINA_OPTS. Quotes are not necessary, but if you want to include them, the proper placement is: set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.2.4.jar" Create a new file in the same directory named /bin/setenv.bat with the following content: set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path/to/applicationinsights-agent-3.2.4.jar Tomcat 8 (Windows) Running Tomcat from the command line If the file /bin/setenv.sh already exists, then modify that file and add -javaagent:path/to/applicationinsights-agent-3.2.4.jar to CATALINA_OPTS. Create a new file in the same directory named /bin/setenv.sh with the following content: CATALINA_OPTS="$CATALINA_OPTS -javaagent:path/to/applicationinsights-agent-3.2.4.jar"
#INTELLIJ JAR ON APPLICATION SERVER DOWNLOAD#
If you installed Tomcat via download and unzip from, then you should have a file /bin/catalina.sh. Add this line to the end of that file: JAVA_OPTS="$JAVA_OPTS -javaagent:path/to/applicationinsights-agent-3.2.4.jar" If you installed Tomcat via apt-get or yum, then you should have a file /etc/tomcat8/nf. Tomcat 8 (Linux) Tomcat installed via apt-get or yum If you are using the shell form, add the JVM arg -javaagent:path/to/applicationinsights-agent-3.2.4.jar somewhere before -jar, for example: ENTRYPOINT java -javaagent:path/to/applicationinsights-agent-3.2.4.jar -jar If you are using the exec form, add the parameter "-javaagent:path/to/applicationinsights-agent-3.2.4.jar" to the parameter list somewhere before the "-jar" parameter, for example: ENTRYPOINT In this article Azure environmentsĪdd the JVM arg -javaagent:path/to/applicationinsights-agent-3.2.4.jar somewhere before -jar, for example: java -javaagent:path/to/applicationinsights-agent-3.2.4.jar -jar You can follow the Jetbrain documentation on remote debugging.Thank you. Select Run -> Debug -> Your Debug ProfileĬode in bundles can be debugged using a standard generic remote debug connection.You are now all set up for debugging your JSPs in AEM.
![intellij jar on application server intellij jar on application server](https://docs.bmc.com/docs/integrationService/files/955545937/955545941/1/1600897182283/intelliJ_remoteHosting.png)
You can also add these options to your start script in crx-quickstart/bin/start as shown below. Java -Xdebug -Xrunjdwp:transport=dt_socket,address=58242,suspend=n,server=y -Xmx1024m -XX:MaxPermSize=256M -jar cq-quickstart-5.6.1.jar You can do this by starting the AEM jar file directly and adding these options, for example with the following command line: The last step required is to start AEM with the JVM options proposed by IntelliJ IDEA. Copy the command line arguments that IntelliJ IDEA proposes.On the Startup/Connection pane, adjust the port if required.Remove all Before launch tasks if you use vlt autosync, or configure appropriate Maven tasks if you don’t.
![intellij jar on application server intellij jar on application server](https://imgs.developpaper.com/imgs/1681551376-5a541b2c2085d_articlex.png)
Set the start page to an appropriate URL if you want to open a browser when you start debugging.In the configuration dialog, select Configure next to Application Server and configure a Generic server.Restart IntelliJ IDEA when requested to.Navigate to the JSR45 Integration Plugin and select the check box next to it.Go to the Plugins pane in the IntelliJ IDEA settings.As the Web Resource Directory, select the content/src/main/content/jcr_root subdirectory of your project as shown in the screen shot below.Click + above the list of modules and select Web.As IDEA cannot interpret the content-package-maven-plugin settings, this needs to be configured manually. IntelliJ IDEA needs to understand where to find the JSPs for debugging. The following steps are necessary for debugging JSPs with IntelliJ IDEA You are now set up for AEM Development using IntelliJ IDEA In the Import dialog, select the POM file of your project.Ĭontinue with the default settings as shown in the dialog below.Ĭontinue through the following dialogs by clicking Next and Finish. selecting File -> Import Project from the main menu.
![intellij jar on application server intellij jar on application server](https://i.stack.imgur.com/AHxbr.png)
selecting Import Project on the welcome screen if you have no project open yet.Open the Import dialog in IntelliJ IDEA by IntelliJ IDEA can also provide support in working with JSP, e.g.įor that to work, follow the instructions on How-To Work with JSPs in How-To Build AEM Projects using Apache Maven. To start working with AEM projects in IntelliJ IDEA, the basic setup in Getting Started in 5 Minutes is sufficient. Next, set up your project using Maven as described in How-To Build AEM Projects using Apache Maven. Then, follow the installation instructions on that page.
#INTELLIJ JAR ON APPLICATION SERVER INSTALL#
Install IntelliJ IDEAĭownload IntelliJ IDEA from the Downloads page at JetBrains. This guide is based on IntelliJ IDEA Ultimate Edition 12.1.4 and AEM 5.6.1.