How do i debug a web application running on jetty in eclipse?

后端 未结 7 2025
無奈伤痛
無奈伤痛 2021-01-31 12:24

never done web programming before. Is there a way to set breakpoints, see variable values in eclipse? The app i want to debug makes a Query string whcih i would like to easily e

相关标签:
7条回答
  • 2021-01-31 12:55

    None of the answers worked for me. Here's what did work:

    • Create Maven Eclipse Runtime for your project:
    • right-click on project -> maven build -> goals: jetty:run
    • go to JRE tab of your Maven Eclipse Runtime, and in the VM arguments section add:

    -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

    When you execute this runtime, the first thing the Eclipse console outputs (in blue) is:

    Listening for transport dt_socket at address: 8000

    Now you can create a Remote Java application Debug Runtime and connect to the debug port (8000 in this example)

    0 讨论(0)
提交回复
热议问题