Andreas Lecerof 7 Years Ago Thank you for sharing!I'm also running IntelliJ and not running Tomcat within IntelliJ.>The downside to this approach is that there is zero support for hot deploy; if >you change code you have to do a build and deploy it for debugging to work.JRebel will do the work for you.For debugging, I changed my setenv.sh (in tomcat/bin), and added the following line:DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"then DEBUG_OPTS is added to JAVA_OPTS:JAVA_OPTS="$JAVA_OPTS $DEBUG_OPTS ... etc. Please sign in to reply. Reply as... Cancel David H Nebinger Andreas Lecerof 7 Years Ago I haven't tried jrebel against LR7 yet. Have you been able to change code, jsp, etc in the module layer and get it to work? If so, I'll have to give it a shot...I went with the "jpda start" option so I didn't have to put the debug settings in setenv.sh. I want to be able to switch debug on and off w/o having to edit setenv.sh. Using the already supported "jpda start" option was just the ticket. Please sign in to reply. Reply as... Cancel
David H Nebinger Andreas Lecerof 7 Years Ago I haven't tried jrebel against LR7 yet. Have you been able to change code, jsp, etc in the module layer and get it to work? If so, I'll have to give it a shot...I went with the "jpda start" option so I didn't have to put the debug settings in setenv.sh. I want to be able to switch debug on and off w/o having to edit setenv.sh. Using the already supported "jpda start" option was just the ticket. Please sign in to reply. Reply as... Cancel
Johnathan Burbea 7 Years Ago please show us the embedded / integrated liferay runtime tomcat JVM with intellij; do you know that only intellij can do integrated tomcat running and debugging on a separate host, not just local? key differentiator between eclipse and intellij (being the superior IDE) Please sign in to reply. Reply as... Cancel
Jack Bakker 7 Years Ago I prefer IntelliJ configs for run/debug of Tomcat with or without JRebel. No idea how JRebel will be used with Liferay 7 OSGi jars. Please sign in to reply. Reply as... Cancel
Jack Bakker 6 Years Ago Ok, I gave in to David's wisdom. I now follow similar to what David presents here where I run tomcat and then debug from IntelliJ. This approach allows my dev tomcat to run in a more similar way to non-dev environments like staging and prod. Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 6 Years Ago I wouldn't call it wisdom, really. It is really more of a reflection of having all to often given something that worked just fine in a developer rig only to find it fail on me for one reason or another when deployed to test.So now I always run my local dev environment as a clone of how it is in test; separate elastic, manual copying of artifacts to the Liferay deploy folder, ...I know it is the old school way of doing things, and it does cost me some developer time. But my artifacts deploy just as I expect in test and higher lanes, so to me it is a price worth paying. Please sign in to reply. Reply as... Cancel
David H Nebinger Jack Bakker 6 Years Ago I wouldn't call it wisdom, really. It is really more of a reflection of having all to often given something that worked just fine in a developer rig only to find it fail on me for one reason or another when deployed to test.So now I always run my local dev environment as a clone of how it is in test; separate elastic, manual copying of artifacts to the Liferay deploy folder, ...I know it is the old school way of doing things, and it does cost me some developer time. But my artifacts deploy just as I expect in test and higher lanes, so to me it is a price worth paying. Please sign in to reply. Reply as... Cancel
Jack Bakker 6 Years Ago how would I add in debugging of marketplace jasperreports-web ? is EE only and source is available Please sign in to reply. Reply as... Cancel David H Nebinger Jack Bakker 6 Years Ago Good question. Not sure I know. Intellij does have a decompiler for when source is not available, but I don't know how you would set your original breakpoints, for example. Surely it must be possible, of course, but it would take some investigation to find out. Please sign in to reply. Reply as... Cancel
David H Nebinger Jack Bakker 6 Years Ago Good question. Not sure I know. Intellij does have a decompiler for when source is not available, but I don't know how you would set your original breakpoints, for example. Surely it must be possible, of course, but it would take some investigation to find out. Please sign in to reply. Reply as... Cancel
Vitaliy Koshelenko 5 Years Ago Thanks for sharing. Is there a way to debug JSPs inside OSGi modules in Liferay 7? https://community.liferay.com/forums/-/message_boards/message/112440770 Please sign in to reply. Reply as... Cancel