TP5 debugging

config.php is modified to the following two parameters:

// apply Trace
'app_trace'              => true,
'trace'                  => [
	// Built-in Html Console support extension
	'type' => 'Console',
],

 

There are three debugging methods for controller/Index.php, trace is recommended

<?php
namespace app\index\controller;

class Index
{
    public function index()
    {
        //dump variable debug output
        dump(['a', 'b', 'c']);
        //halt variable debug and break output
        //The function of the halt method is the same as that of dump, except that it will interrupt the execution of the current program after outputting the variable.
        //stop(['a', 'b', 'c']);
        trace(['aaa', 'bbb', 'ccc']);
    }
}

 

Effect picture:

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326566314&siteId=291194637