thinkphp Notes--Open Debug Debug mode

Source: Internet
Author: User
Tags php write

Debug+trace mode can see the error message of TP during the development process, which can better help the developer to debug. But the debug mode is not simple to set up in the configuration file can be, after looking for data to explore, find an effective method.

First of all, you've deployed the Thinkphp project directory.

Then note is in the import file Open debug mode, in the Portal file index.php write code define (' App_debug ', true); First delete the runtime directory, and then run it again, you will find that the runtime directory below the ~runtime.php file is not, your debug mode opened successfully

The reason this ~runtime.php file is deleted, this file is compiled file will have cache, so during debugging mode we do not have to worry about the cache caused by other errors

The trace page is also a way for our developers to get the error message, so we need to open the trace page, in the THinkPHp3.0 version of the trace page is not open by default, we need to manually add in the project configuration file

' Show_page_trace ' =>true,//Display page TRACE information

Want to see if the trace information is turned on, as long as we are in the IndexAction.class.php index side

The law adds $this->display ();

Then run it again if you see the following interface that shows your debug mode, as well as the trace and the Open

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.