JSP debugging in IntelliJ IDEA

后端 未结 6 987
日久生厌
日久生厌 2020-11-30 21:31

Does anyone know how to debug JSP in IntelliJ IDEA?

When I set breakpoint in my JSP files, those breakpoints never seem to

6条回答
  •  悲哀的现实
    2020-11-30 21:49

    If you are using the Intellij debugger you can get the value of an individual attribute by putting a breakpoint inside JSP and evaluating the expression this.jspContext.request.getAttribute("attributeName").

    Note that this may return a Java Object type, and you may have to cast it to the correct type. Also if you launch a remote Tomcat the IDEA won't hit any breakpoints, so you need to launch the Tomcat in debug mode from inside the IDEA.

提交回复
热议问题