Home > PHP Framework > YII > How to use debug in yii framework

How to use debug in yii framework

王林
Release: 2020-02-19 14:36:10
Original
3601 people have browsed it

How to use debug in yii framework

The advanced version of yii2 is used here. Configure debug mode for interface access.

Configuration file directory: frontend/config/main-local.php

(Recommended tutorial: yii framework)

Configuration content:

The
if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug']['class'] = 'yii\debug\Module';
    $config['modules']['debug']['allowedIPs'] = ['*', '127.0.0.1', '0.0.0.0'];
    $config['modules']['debug']['historySize'] = 200;
}
Copy after login

allowedIPs field indicates the IP fields that are allowed to be accessed. Then historySize represents the size of the stored debug file.

Enter the address frontend/web/index.php?r=debug to enter debug mode.

How to use debug in yii framework

#Click on the tag to enter this request, and then view the sql, cpu occupancy, execution time, etc.

For more programming related content, please pay attention to the Programming Introduction column on the php Chinese website!

The above is the detailed content of How to use debug in yii framework. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template