首页 > 编程语言 >phpstorm开启debug断点调试模式

phpstorm开启debug断点调试模式

时间:2024-02-22 10:23:24浏览次数:29  
标签:xdebug remote phpstorm Xdebug 调试模式 debug php 断点

查看php版本

查看自己php的版本,使用:phpinfo() 函数

<?php
echo phpinfo();

Xdebug

Xdebug: Support — Tailored Installation Instructions
右击查看index.php源代码
image

并复制到Xdebug中
image

点击分析查看分析结果
image

修改php配置文件

vi /opt/homebrew/etc/php/7.4/conf.d/99-xdebug.ini

#安装完Xdebug自带
zend_extension = xdebug
#添加部分
xdebug.mode=debug
xdebug.remote_enable = On
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
xdebug.remote_port = 9000
xdebug.idekey = "PHPSTORM"

9000端口是phpstorm设置里面xdebug的端口,如果本地已经被占用了可以修改,修改路径是在phpstrom里面:file->settings->里面的PHP->Debug

image
idekey 必须要和xdebug配置的保存一致,
image

重启php

重启php环境,在刷新一下php网站的环境信息,里面就会有xdebug的描述,即配置成功
brew services restart [email protected]
image

添加php web Page配置

添加php web Page
image
添加server
image

特重要步骤

必须要去验证下是否可用,它会告诉你当前存在的问题或者是否已经可用,按照提示去修复即可。
image

标签:xdebug,remote,phpstorm,Xdebug,调试模式,debug,php,断点
From: https://www.cnblogs.com/aeolian/p/18026587

相关文章

  • 使用 Visual Studio 断点调试 DLL
    继上文说到使用IDA和WinDbg调试无dmp文件  那么在有源码的情况下可以直接断点调试DLL,目的是查看DLL内部的函数调用场景:程序执行到某个DLL时突然崩溃,先确定Debug生成的DLL在程序中运行是否也会有闪退如果有,则适用于VS断点调试操作步骤:在Debug下生成一......
  • Java注解篇之@SuppressWarnings注解详解 代码编译通过且可以运行,但每行前面的“感叹号
    Java注解篇之@SuppressWarnings注解详解@SuppressWarnings作用:用于抑制编译器产生警告信息。它的注解目标为类、字段、函数、函数入参、构造函数和函数的局部变量,但是建议注解声明在最接近警告发生的位置。去感叹号?我们经常遇到代码编译通过且可以运行,但每行前面的“感叹号”就......
  • 数学分析中间断点的类型
    在数学分析中,函数的间断点是指函数在该点附近的行为表现出不一致或者极端性的点。间断点的类型主要有两种:第一类间断点和第二类间断点。第一类间断点:可去间断点和跳跃间断点。可去间断点(RemovableDiscontinuity):如果函数在某点的左极限和右极限都存在且相等,但函数在该点要么没有......
  • C++文件输入输出的简单实现(Debug)
    1.前言:        文件输入输出是个很有用的东西,有时比赛时要有:要求使用文件输入输出,还有时候……    遇到这种时间限制非常恶心的题目:手动测试会有误差……    文件输入输出是个很好的选择!2.写法:C    C语言的写法有点复杂,涉及文件指针,本文不......
  • Debug: tf distribute strategy parameter server: tfx component trainer: OutOfRang
    [ERROR:tfdistributestrategyparameterserver:tfxcomponenttrainer:OutOfRangeError(),Node:'cond/IteratorGetNext'Endofsequence]logofpodtfx-component-trainer:2024-02-1409:43:48.571820:W./tensorflow/core/distributed_runtime/eager/......
  • Keil5在Debug下如何实时查看变量的值
    在Debug模式下查看某个变量的值很简单,只需把需要查看的变量添加到watch,有一点要注意的是该变量必须是全局变量才能实时显示,具体操作如下图。1、把鼠标光标移到要查看的变量处;2、点击鼠标右键,在弹出的窗口中选择Add‘ADC _Value’to;3、选择显示的窗口,有两个窗口选择。变量......
  • Debug: tf distribute strategy parameter server: NOT_FOUND: No such file or dire
    [ERROR:NOT_FOUND:/tfx/tfx_pv/pipelines/detect_anomolies_on_wafer_tfdv_schema/ImportExampleGen/examples/67/Split-train/data_tfrecord-00000-of-00001.gz;Nosuchfileordirectory]logofpodtfx-trainer-component:ERROR:tensorflow:/job:worker/task:0en......
  • Debug : kfp.Client().upload_pipeline(): Failed to start a transaction to create
    [ERROR:Failedtostartatransactiontocreateanewpipelineandanewpipelineversion:dialtcp:lookupmysqlon10.96.0.10:53:nosuchhost","]>>>kfp.Client().upload_pipeline("/home/maye/pipeline_wafer_distribute.yaml",......
  • Debug: tf distribute strategy parameter server: stuck at "INFO:tensorflow:Parame
    [ERROR:stuckat"INFO:tensorflow:ParameterServerStrategyV2isnowconnectingtoclusterwithcluster_spec:ClusterSpec({'ps':['dist-strat-example-ps-0:5000'],'worker':['dist-strat-example-worker-0:5000',&#......
  • Debug: tf_ditribute_strategy_worker.yaml: unknown field "spec.template.spec.node
    [ERROR:unknownfield"spec.template.spec.nodeAffinity"](base)maye@maye-Inspiron-5547:~/github_repository/tensorflow_ecosystem/distribution_strategy$kubectlapply-fmaye_template.yamlservice/dist-strat-example-worker-0createdservice/dis......