search
HomeBackend DevelopmentPHP TutorialChromePHP for PHP debugging
ChromePHP for PHP debuggingSep 05, 2019 pm 01:47 PM
php debugging

PHP调试工具有很多,这里只介绍ChromePHP

ChromePHP

ChromePHP 是 基于谷歌浏览器的插件 .

在PHP代码中,不会终止代码,并且会在谷歌 console 台中打印出信息 .

插件链接 下载 chrome_php_logger.crx 并且安装 .

PHP

ChromePHP 下载 chrome_php.php .

代码使用

<?php<br/>    return &#39;chrome_php.php&#39;;<br/>    ChromePhp::log(&#39;this is php log&#39;);<br/>   <br/>    ChromePhp::info($_SERVER);<br/>   <br/>    //ChromePhp::log(23,&#39;info&#39;);<br/>    //ChromePhp::error(&#39;some info&#39;)<br/>compose.json 使用<br/>{<br/>    "autoload": {<br/>        "psr-4": {<br/>            "bookLog\\": "bookLog"<br/>        },<br/>        "files": [<br/>           "comFunction/chrome_php.php" #对应要加载的文件地址<br/>        ]<br/>    }<br/>   <br/>}<br/>

浏览器

ChromePHP for PHP debugging

通过浏览器访问,在 console 台中可以看到 PHP 中想要的打印信息已经输出!

Tips : 不同浏览器的版本, console 台中的数据可能单次不会出现 . 在访问地址时,关闭 console 台, 访问结束后开启 console(F12) 台,这样就会有信息输出了!

The above is the detailed content of ChromePHP for PHP debugging. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
PHP开发的10个调试技巧PHP开发的10个调试技巧May 24, 2023 am 08:23 AM

在PHP开发过程中,调试是不可避免的一个过程。但是有些开发者在遇到问题时,往往会采用非常低效的方法进行调试,比如打断点、输出调试信息等。这些方法并不一定能够有效地解决问题,同时还会损失很多时间和精力。为此,本文将介绍PHP开发中10个高效的调试技巧,相信这些技巧能够帮助PHP开发者更快更准确地解决问题。使用xdebugxdebug是PHP调试过程中的一款强大

PHP调试技巧:如何使用xdebug插件进行代码调试和断点设置PHP调试技巧:如何使用xdebug插件进行代码调试和断点设置Aug 01, 2023 pm 07:57 PM

PHP调试技巧:如何使用xdebug插件进行代码调试和断点设置引言:在开发PHP应用程序时,调试是一个非常重要的环节。调试能够帮助我们快速找到代码中的错误并进行修复,提高开发效率。而xdebug是PHP开发者常用的调试插件之一,它提供了强大的调试功能,本文将介绍如何使用xdebug插件进行代码调试和断点设置。一、安装和配置xdebug插件要使用xdebug插

PHP Linux脚本调试技巧:解决常见问题的方法PHP Linux脚本调试技巧:解决常见问题的方法Oct 05, 2023 am 10:07 AM

PHPLinux脚本调试技巧:解决常见问题的方法,需要具体代码示例引言:在开发和维护PHP脚本时,我们经常会遇到各种各样的问题。调试是解决这些问题的关键步骤之一。本文将介绍一些在Linux环境下调试PHP脚本的常见问题和解决方法,并提供具体的代码示例。一、使用echo和var_dump输出变量值在调试PHP脚本时,我们经常需要查看变量的值以确定代码的执行情

在PHP中调试无法定位错误代码的问题在PHP中调试无法定位错误代码的问题May 11, 2023 pm 07:01 PM

PHP作为一种开源、通用的脚本语言,广泛应用于Web开发领域。在日常的开发工作中,我们难免会遇到无法定位错误代码的问题。本文将介绍在PHP中调试无法定位错误代码的问题,并提供一些实用的调试技巧和工具。一、代码审查在遇到代码问题时,先检查代码是否有语法或逻辑错误。PHP提供了error_reporting和display_errors指令来捕获和显示错误信息。

PHP如何快速调试微信小程序接口PHP如何快速调试微信小程序接口Jun 02, 2023 am 08:10 AM

近年来,微信小程序的热度不断攀升,越来越多的开发者开始涉足其中。而对于PHP开发人员来说,如何快速调试微信小程序接口,是一个必要的技能。本文将为大家介绍PHP如何快速调试微信小程序接口的方法及步骤。一、开启调试模式首先,在微信小程序中需要开启调试模式。在微信小程序开发工具的左侧边栏中,点击“设置”-“项目设置”,将“开发者工具中的调试模式”选项勾选上。开

详解PHP语言开发中的调试技巧详解PHP语言开发中的调试技巧Jun 09, 2023 pm 07:37 PM

在PHP语言开发中,调试技巧是非常重要的一环。调试是开发中必不可少的过程,它可以帮助我们找到程序中的缺陷和错误。在本文中,我们将详细讲解PHP语言开发中的调试技巧,帮助开发者更高效地进行开发。使用var_dump()和print_r()函数在PHP语言中,var_dump()和print_r()函数是非常常用的调试工具之一。这两个函数都可以帮助我们在网页上输

PHP调试工具的使用及常见问题解决方案PHP调试工具的使用及常见问题解决方案Jun 08, 2023 pm 04:02 PM

随着互联网的普及和发展,PHP已成为一种主流的Web编程语言,尤其在中小型企业和个人开发者中广泛使用。在开发PHP程序时,避免不了会遇到各种各样的问题,这时就要用到PHP调试工具来查找问题并进行调试。本文将介绍PHP调试工具的使用方法,并提供一些常见问题的解决方案。一、PHP调试工具介绍XdebugXdebug是PHP的一个调试和性能分析工具,它可以帮助开发

PHP入门指南:PHP调试PHP入门指南:PHP调试May 22, 2023 pm 10:51 PM

PHP是一种流行的编程语言,无论是网站开发还是桌面应用程序开发,PHP的应用都非常广泛。如果你正在学习PHP,那么你应该知道,调试是你编写代码的一个重要环节。在PHP程序中,你可能会遇到各种各样的问题,例如程序运行缓慢、调用无效、服务器响应不佳等等。调试就是要找出这些问题,并解决它们。在本篇文章中,我们将介绍PHP调试的一些基本概念、方法以及工具,帮助你更好

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),