php调试问题
平时echo,var_dump,exit,die().来调试的,这么调试效率极其底下。今天试试xdebug+sublimt调试,发现也是不好用的主。
各位是这么调试的。难道我们php,都是var_dump.调试的吗?
回复内容:
平时echo,var_dump,exit,die().来调试的,这么调试效率极其底下。今天试试xdebug+sublimt调试,发现也是不好用的主。
各位是这么调试的。难道我们php,都是var_dump.调试的吗?
xdebug
只是配个正规的IDE
,不然用起来和gdb
没什么区别。配合一个PhpStorm
之类的IDE
,断点、步进、变量细节都是非常简单的操作,比echo
、var_dump
这种靠猜的调试要方便多了。
我就是用这个来调试Beaver
的 https://github.com/funcuter/beaver
echo,var_dump,exit,die()
不是特别复杂的应用,小网站什么够用了,
chromephp插件&chromephp.php类库
https://github.com/ccampbell/chromephp
下载ChromePhp.php
然后新建一个PHP文件,比如1.php
<code>include 'ChromePhp.php'; ChromePhp::log('Hello console!'); ChromePhp::log($_SERVER); ChromePhp::warn('something went wrong!');</code>
chrome应用商店安装chromephp插件(要翻一下)
然后打开一个新的tab,点亮chromephp插件
输入一个URL就可以在chrome开发工具 console选项卡下看到调试输出,我的结果截图
使用phpstrom吧,调试功能很强大的,比如断电调试。我的最爱。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c
