Sending “var_dump” to FireBug console

前端 未结 12 1231
忘掉有多难
忘掉有多难 2020-12-31 13:11

As you know var_dump() in addition to value show its data type and length.

Is there any way to log its output to

12条回答
  •  孤城傲影
    2020-12-31 13:28

    If you have an Ajax (XHR) call that is generating output with a var_dump() then you can inspect the request in FireBug either under 'Console' or 'Net'. Click the plus sign to expand it and look at the 'Response' tab.

    Otherwise if you are putting var_dump() into the main page you are viewing it should just appear in the page as viewed although the formatting might be messed up. Try

    echo '
    ' 
    

    before the var_dump() or alternatively view the page source rather than the direct output.

提交回复
热议问题