How to debug after compiling CAs 5.1.8 with IntelliJ idea?
In my machine, IntelliJ idea directly press run or debug, in a vain attempt to run or debug, it will be an error. A lot of bugs, what "Restartedmain Error Error creating converter for Xwex java.lang.reflect.InvocationTargetException" and so on, The log4j and spring boot versions are said to be incompatible, and so on. As a Java for beginners, the face of such a "huge" system, there are too many things do not understand, ran out so many errors, daunting, can not start.
Because by default, the CAs 5.1.8,intellij idea is run as a spring boot program:
But when we deploy, we're just going to cas-5.1.8\webapp\cas-server-webapp\build\libs\ Cas-server-webapp-5.1.8.war throw to Tomcat, then, in fact, we can run at Tomcat in IntelliJ idea.
Run-edit Configurations-+-Tomcat server, add "Cas-server-webapp-5.1.8.war" in Deployment
Set the breakpoint, click the bug icon next to the run, and you can debug it.
Single-Step Debugging: F8
The mouse hovers over the breakpoint line, and you can see the value of the variable
If you want to observe the results of the statement, you can right-click, in the shortcut menu "Add Watch", enter it.
It's very convenient.