Debugging CAS 5.1.8 with IntelliJ idea

Source: Internet
Author: User
Tags cas tomcat server

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.