: 打开这个配置文件,并添加启用 Xdebug 的配置信息: zend_extension=xdebug.so xdebug.remote_enable=1 xdebug.remote_host=localhost...xdebug.remote_port=9001 xdebug.remote_autostart=1 xdebug.profiler_enable=1 xdebug.profiler_output_dir...的 Debug port 修改为 9001(和 Xdebug 配置保持一致): 应用该更改,点击「OK」关闭窗口,这样我们就完成了 PHP 远程代码调试的所有配置工作了。...这样,我们就完成了在 PhpStorm 中监听 WSL 虚拟机中 PHP 代码远程调试的工作。...PHP Web 项目运行环境(LNMP,第二篇),最后,我们还学习了如何在本地 PhpStorm 中集成 WSL 虚拟机中的 PHP CLI 解释器进行单元测试和远程代码调试(本篇)。
今天小梦就给大家讲讲在PHP开发中(划重点:PHP开发,当然其他语言开发也是有类似的工具的,比如前端开发,浏览器自带debug,还有开发java的ide编辑器)排错的小工具和帮助我们更好的阅读源码(程序执行流程...首先需要的工具:Phpstorm(版本随意)/PHP本地/线上(不推荐线上)开发环境/PHP框架一枚(本文选ThinkPHP5)/firefox浏览器一个 具体操作步骤如下: 1、首先去下载一个xdebug.dell...] zend_extension ="php_xdebug.dll" //扩展地址 xdebug.idekey="PHPSTORM" //ide的配置和浏览器的配置,后面我再告诉你 xdebug.remote_handler...= "dbgp" xdebug.remote_mode = "req" xdebug.remote_host=127.0.0.1 xdebug.remote_enable=on xdebug.remote_port...= 9000 xdebug.remote_autostart = no 这个是配置xdebug的选项,然后idekey是你的ide的key,要和你的ide保持一致 使用phpinfo.php查看是否已经被安装成功
ext-xdebug.ini 对 Xdebug 进行单独配置,PHP 会自动加载对应的配置文件): [XDebug] zend_extension="xdebug.so" xdebug.remote_enable...=1 xdebug.remote_host=localhost xdebug.remote_port=9001 xdebug.remote_autostart=1 xdebug.profiler_enable...=1 xdebug.profiler_output_dir="/tmp" xdebug.idekey=PHPSTORM 这里我们启用了远程监听(包括 IP 地址和端口设置)、脚本分析、以及设置 idekey...为 PHPSTORM,关于调试和分析配置项细节和含义,请参考 Xdebug 官方提供的调试设置和脚本分析文档。...完成以上准备工作后,可以在任意空目录下新建 index.php,在其中编写如下 PHP 脚本: <?php phpinfo(); ?
先 composer clearcache 清理包、仓库缓存,再用 composer update,如果不起效,就删掉 vendor 目录重新安装。 3....安装 安装 phpstorm 和 laravel 的部分这里不再多说,之前都有提到。...\php-7.1.32-nts-Win32-VC14-x64\ext\php_xdebug.dll"xdebug.remote_enable=1xdebug.remote_port=9000xdebug.remote_host...=localhostxdebug.profiler_enable=1xdebug.remote_mode = "req"xdebug.trace_output_dir="..../xdebug"xdebug.remote_handler="dbgp"xdebug.idekey = "phpstorm" //必填 扫行php -m查看安装情况: C:\Users\admin>php
这是配置xdebug xdebug.remote_enable = On //是否运行远程终端,必须开启 xdebug.remote_handler = "dbgp" xdebug.remote_host...= "localhost" xdebug.remote_port = 9001 //这个端口号要和phpstorm中的保持一致,示例的端口是9001 xdebug.idekey = PHPSTROM...三、配置phpstorm以支持xdebug 1、点击左上角phpstorm,选择preferences。 ? 2、配置php下的Debug ? 3、配置Debug下的DBGp proxy ?...3、浏览器跳转打开phpstorm后,页面上和debugger框会有数据信息显示,如下图。 代码页面: ? debugger框: ? 六、调试过程中警告提示 ?...xdebug.remote_handler=dbgp ;远程头请求方式 xdebug.remote_host=localhost ;远程地址 xdebug.remote_port=
:phpstorm中 第四步:phpstorm中 第五步:phpstorm中 ---- 注意: 想要在phpstorm中调试请满足一个条件。...On xdebug.idekey = "PHPSTORM" zend_extension=D:/phpstudy_pro/Extensions/php/php7.3.4nts/ext/php_xdebug.dll...:\phpstudy_pro\Extensions\tmp\xdebug" xdebug.remote_enable=On xdebug.remote_host=127.0.0.1 xdebug.remote_port...=9100 xdebug.remote_handler=dbgp 第二步:phpstorm中 phpstorm—>File----》settings---->languages&Frameworks--...第三步:phpstorm中 第四步:phpstorm中 第五步:phpstorm中 完成!!!
\xdebug" xdebug.remote_enable=1 xdebug.trace_output_dir="D:\phpStudy\tmp\xdebug" xdebug.remote_host=app.cn..."PHPSTORM" xdebug.profiler_enable_trigger_value=PHPXDEBUG xdebug.profiler_enable_trigger=1 xdebug.profiler_enable...=on xdebug.remote_connect_back=on 首先配置好xdebug等相关的,如果能够用浏览器debug的话,就说明配置好了 打好断点,使用postman进行debug时只需要在你的...XDEBUG_SESSION_START=PHPSTORM 如url?XDEBUG_SESSION_START=PHPSTORM,这个时候就会进入断点。...-------------更新phpstorm下cli模式的debug---------------------- php -dxdebug.remote_enable=1 -dxdebug.remote_autostart
PHP版本配置,使用和phpstudy对应的版本 ?...Mappings面板:配置相对目录和访问地址 ? 配置完之后点击“确定”。 配置运行环境,我们点击“运行/编辑配置”菜单进行运行环境配置 ? ?...\Extensions\tmp\xdebug" ;profiler_enable设置为1的时候,效能监测信息写入文件所在的目录 xdebug.remote_host = "localhost" xdebug.remote_port...=9090 xdebug.remote_handler="dbgp" xdebug.profiler_append = 0 xdebug.remote_enable=On xdebug.idekey=phpstorm-xdebug...php.ini配置文件当中xdebug.remote_port的值,具体配置如下图: ?
PhpStorm 提供了强大的调试功能,这篇教程会教大家如何安装配置 xdebug,最终实现能够在浏览器实际运行程序时在断点处直接跳回 PhpStorm 进行调试。 1....每个版本下还提供了source 源代码和多个windows下的二进制包,如图: 选哪个二进制包需要要根据自己本地安装的PHP 版本、操作系统位数、VC 版本及是否线程安全的来选择,这些信息可以通过运行...local/opt/php71-xdebug/xdebug.so" xdebug.remote_enable=1 xdebug.idekey='PHPSTORM' xdebug.remote_host=...localhost xdebug.remote_port=9008 zend_extension对应是 xdebug 扩展的路径,根据你的实际情况来修改。...注意, 这个端口号就是跟 xdebug 配置里设置的xdebug.remote_port 一致的,当PHPSTROM开启调试时,会开启这个端口, xdebug就会连接上来 点击 “Apply”
其工作原理大概如下(搬运): IDE(如phpstorm)已经集成了一个遵循DBGp的Xdebug插件,当开启它的时候,会在本地开一个xdebug调试服务,监听在调试所设置的端口上,默认是9000,这个服务会监听所有到...在phpstorm中,位于:工具栏>run>Start / Stop Listening for PHP Xdebug Connetions 当浏览器发送一个带XDEBUG_SESSION_START的参数的请求到服务器时...,我只是按需修改了一下) 我的配置文件如下: zend_extension=xdebug.so xdebug.idekey="PHPSTORM" xdebug.remote_enable=1 xdebug.remote_autostart...=0 xdebug.remote_connect_back=1 xdebug.remote_port=9000 几个常见配置解释 设置调试工具 xdebug.idekey="PHPSTORM" 绑定远程调试主机地址...xdebug.remote_host=localhost 远程主机监听的端口 xdebug.remote_port=9000 开启回连 xdebug.remote_connect_back = 1 开启
(注意版本和对应的xdebug) brew install php56-xdebug 这里可能碰到 Error: Formulae found in multiple taps: 的问题, ?...我的配置文件 [xdebug] zend_extension="/usr/local/Cellar/php56-xdebug/2.3.3/xdebug.so" xdebug.remote_enable...=1 xdebug.remote_handler = "dbgp" xdebug.remote_host = "localhost" xdebug.remote_mode = "req" xdebug.remote_port...= 19000 ;xdebug.idekey="PHPSTORM" ;开启自动跟踪 xdebug.auto_trace = On ;开启异常跟踪 xdebug.show_exception_trace...---- 下面开始配置eclipse / phpstorm 的xdebug 配置phpstorm 可以参照: http://log.codes/post/phpstorm-debug-using-xdebug
按照自己的需要选择服务start就好了,比如Wordpress需要的Apache和MySQL。 有可能出现其他程序比如VM workstation占用端口的情况,去进程里做掉就可以打开了。...[xdebug] xdebug.remote_enable = On xdebug.remote_handler = dbgp xdebug.remote_host= localhost xdebug.remote_port...= 9000 xdebug.idekey = PHPSTORM zend_extension="上面安装的文件(比如D:ProgramXAMPPphpextphp_xdebug-2.5.5-7.1-vc14....dll)" 其中xdebug_remote_port的默认值9000有可能与其他应用发生冲突,建议修改为9002等值,相应的之后的端口值也需要作出修改。...之后需要在浏览器(如谷歌,火狐)上安装xdebug helper插件,安装后右击并选择选项,进入配置界面将IDEKEY改为PHPSTORM ?
= "PHPSTORM" #需要和ide根据保持抑制 xdebug.default_enable = 1 xdebug.remote_connect_back = 1 xdebug.remote_port...= 9001 #需要和ide根据保持抑制 xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_handler="dbgp.../webstore/detail/eadndfjplgieldjbigjakmdgkmoaaaoc 配置插件xdebug helper 确保IDE KEY和ini配置保持一致 配置phpStorm...确保Languages & Frameworks =》 PHP =》 Debug 配置端口和xdebug.remote_port一样。...☎️电话图标 浏览器插件打开调试 浏览器页面请求的网址即可看到调试信息 网页和api调试配置方式本质都是在 cookie 中自动添加XDEBUG_SESSION=phpStorm 调试快捷键
="D:\phpstudy_pro\Extensions\tmp\xdebug" xdebug.remote_enable=On xdebug.remote_host=localhost xdebug.remote_port...=9000 xdebug.client_port=9001 xdebug.remote_handler=dbgp xdebug.idekey = PHPSTORM PHP 其中xdebug.remote_enable...,xdebug.remote_host,xdebug.client_port,xdebug.idekey的配置要注意一下。...phpstorm配置 有两处,看下图 这个Debug port填写client_port xdebug浏览器扩展配置 注意选择phpstorm后点击保存 详细debug过程讲解 remote_port...所以这个端口就相当于xdebug的端口 xdebug然后会将监听到的数据发送到client_port,如上图的9001 本地的phpstorm会监听9001端口接受数据,至此完成整个数据传递 因为是本地跑项目本地
8.0.3进行安装,其详细过程如下: 2.1 phpStorm 8.0.3软件下载和安装 2.1.1登录phpStorm官方网站寻找对应版本进行下载(http://www.jetbrains.com...=PhpStorm xdebug.remote_enable = On xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler...=dbgp xdebug.remote_autostart=off ?...· 在phpStorm里打开监听,就是一个电话一样的按钮。 在浏览器里打开XDebug工具,访问localhost,与phpStorm连接成功! ?...3.3.2 Xdebug hepler配置 1进入 Xdebug hepler 的配置选项中,选择 IDE key 为 PHPStorm。 ? 2把扩展调整为 debug 模式,如图 ?
阅读tp框架源码过程中,经常被代码绕来绕去,头晕的很(tp框架源码已很久没有更新); 于是想到了phpstorm+xdebug 断点调试,各种配置不成功后,开始记录自己踩坑记录(在老早以前配置过);.../bin/php/php5.6.40/zend_ext/php_xdebug-2.5.5-5.6-vc11-x86_64.dll" (刚刚下载的拓展) xdebug.remote_enable = 1...xdebug.idekey = PHPSTORM (这个值是作为 XDEBUG_SESSION_START 的值,是通知 PHP 开启调试的标识) # 可选项 xdebug.remote_port =...9005 (监听的端口) xdebug.remote_log="D:/wamp64/tmp/xdebug.log" (记录日志) #xdebug.remote_autostart = 1 (如果开启,...这两个功能是断点调试的最为实用和关键功能。
阅读tp框架源码过程中,经常被代码绕来绕去,头晕的很(tp框架源码已很久没有更新); 于是想到了phpstorm+xdebug 断点调试,各种配置不成功后,开始记录自己踩坑记录(在老早以前配置过); xdebug.../zend_ext/php_xdebug-2.5.5-5.6-vc11-x86_64.dll" (刚刚下载的拓展) xdebug.remote_enable = 1 xdebug.idekey = PHPSTORM...(这个值是作为 XDEBUG_SESSION_START 的值,是通知 PHP 开启调试的标识) # 可选项 xdebug.remote_port = 9005 (监听的端口) xdebug.remote_log...="D:/wamp64/tmp/xdebug.log" (记录日志) #xdebug.remote_autostart = 1 (如果开启,则无论什么请求都会进行调试响应) phpstorm 配置 Language...这两个功能是断点调试的最为实用和关键功能。
配置Xdebug扩展 将下载好的Xdebug扩展复制到php目录下的ext文件夹中,并在php.ini配置的末尾添加如下配置信息: zend_extension=E:\php7\ext\php_xdebug...\xdebug" xdebug.remote_port=9000 xdebug.idekey=PHPSTORM xdebug.remote_autostart=1 xdebug.remote_host...=localhost xdebug.remote_enable=1 然后重启服务,再次打开phpinfo(),出现xdebug扩展表示配置成功 phpStorm中配置Xdebug 在常用的编辑器中配置...xdebug,以phpstorm为例,打开“File->Settings->Languages & Development->PHP->Debug”,配置XDebug监听端口号,需要与在php.ini配置文件中配置的端口号保持一致...上面配置文件写的是PHPSTORM 开启phpStorm调试 首先设置运行服务器为localhost,然后打开php debug监听,运行debug模式,最后设置断点,如下图所示: 最后 如果你觉得这篇文章对你有点用的话
的信息追加到最后(将下面路径相关的信息替换成自己本地的): [XDebug] xdebug.profiler_output_dir="D:\phpStudy\tmp\xdebug" xdebug.remote_enable...=1 xdebug.trace_output_dir="D:\phpStudy\tmp\xdebug" xdebug.remote_host=app.cn zend_extension="D:\phpStudy...\php\php-7.3.15-nts\ext\php_xdebug.dll" xdebug.idekey = "PHPSTORM" xdebug.profiler_enable_trigger_value...=PHPXDEBUG xdebug.profiler_enable_trigger=1 xdebug.profiler_enable=on xdebug.remote_connect_back=on 最后一步...和php,重新请求配置好的域,需要断点时加上对应的get参数或post参数:XDEBUG_SESSION_START=PHPSTORM看是否能正常打断点,记得开启phpstorm的断点监听按钮。
领取专属 10元无门槛券
手把手带您无忧上云