Just click on Run -> Debug and then select the newly created configuration. Once the Tomcat server is started you can run this configuration. You can change the port for Tomcat, to something else, in the Tomcat server.xml file, in the config folder. That way when you start the configuration, Intellij will connect via Socket to the Tomcat server that emits via port 8000. You'll need to set the Debugger mode to Attach to remote JVM, the Transport to Socket, the Host to localhost and lastly the Port to 8000. ![]() The only difference this time is that when you click "+" you'll need to select Remote. To achieve this you'll need to add a new configuration like the previous step. Like all applications you want the ability to debug your backend. Build and deploy to Tomcat Tomcat Remote Debug Tomcat then knows it has a new version of the file and redeploys it. What this line does is that it builds the project, using Maven, and then gets the file from the specified path (that's usually configured in your project) and copies it to the webapps folder in Tomcat. war:war :wagon-maven-plugin:upload-single omFile=D:\work\project\backend.war -Dwagon.url=file://C:\apache-tomcat-8.5.34\webapps\ Select your project location and add the following command line. Don't forget to name your new configuration. To achieve this you'll need to head over to Run -> Edit Configurations, click the "+" and select Maven. Now that you're done with the Tomcat configuration you want the ability to build using Maven and deploy to the now working Tomcat server. ![]() If you go to Tools -> External Tools and click on Tomcat, it should start the Tomcat server. The working directory should be set automatically. And last but not least set an argument with the command jpda run. For example mine is C:\apache-tomcat-8.5.34\bin\catalina.bat. For tool settings, select the catalina.bat file, usually located in the bin folder of your Tomcat installation. You can add a new tool with whatever name you want. Make sure you install Tomcat in a place that doesn't require admin access, for example next to your project.Īfter that, open File -> Settings and expand Tools and select External Tools. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |