0

When I try to run my web-app in debug mode (by following Debug web app in IntelliJ, webapp built by maven, run by jetty) on jetty using maven jetty plug-in, it getting succeeded with BUILD SUCCESS and getting disconnected as given below rather than running application in debug mode

steps:

Right click on jetty:run and select Debug from context menu from given picture below

When I just the do jetty:run, the application is getting started and behaving as expected, but while I try to run in debug mode, it is ending with build success and getting disconnected, see logs below.

enter image description here

"C:\Program Files\Java\jdk1.8.0_211\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:54346,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=D:\my-company\code\my-proj\module1\some-webapp "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3\plugins\maven\lib\maven3\bin\m2.conf" -javaagent:C:\Users\shiva\.IdeaIC2019.1\system\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version2019.1.3 -DskipTests=true jetty:start -P dev,!test,!app,!it,!ux,!repositories,!meta-tar,!dev-auto-build,!coverage



[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building some-webapp 19.11.1.7
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> jetty-maven-plugin:9.4.19.v20190610:start (default-cli) > validate @ some-webapp >>>
[INFO] 
[INFO] <<< jetty-maven-plugin:9.4.19.v20190610:start (default-cli) < validate @ some-webapp <<<
[INFO] 
[INFO] --- jetty-maven-plugin:9.4.19.v20190610:start (default-cli) @ some-webapp ---
..... **some more logs here** ----
[INFO] Started ServerConnector@fc35cc{HTTP/1.1,[http/1.1]}{0.0.0.0:8081}
[INFO] Started @53671ms
[INFO] Started Jetty Server
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.219 s
[INFO] Finished at: 2020-02-13T23:33:57+05:30
Shiva
  • 1,773
  • 9
  • 25
  • Consider using Jetty run/debug configuration instead. Debugging Maven goals needs specific support from the IDE for the plug-ins used so that the debug arguments are passed not to the Maven itself, but to the process it starts using this plug-in (Jetty server in your case). It looks like this specific case [is not supported](https://youtrack.jetbrains.com/issue/IDEA-41783). – CrazyCoder Feb 13 '20 at 18:48
  • this worked before, for strange reasons, it is not working now. – Shiva Feb 15 '20 at 12:53
  • Feel free to report at https://youtrack.jetbrains.com/newIssue?project=IDEA with the [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) attached. – CrazyCoder Feb 15 '20 at 18:49

0 Answers0