• 欢迎访问速搜资源吧,如果在网站上找不到你需要的资源,可以在留言板上留言,管理员会尽量满足你!

【速搜问答】Xdebug是什么

问答 admin 1年前 (2020-09-04) 232次浏览 已收录 0个评论

汉英对照:
Chinese-English Translation:

Xdebug是一个开放源代码的PHP程序调试器(即一个Debug工具),可以用来跟踪,调试和分析PHP程序的运行状况。

Xdebug is an open source PHP debugger (i.e. a debug tool), which can be used to track, debug and analyze the running status of PHP programs.

Xdebug 是一个开放源代码的 PHP 程序调试器(即一个 Debug 工具),可以用来跟踪,调试和分析 PHP 程序的运行状况。Xdebug2018 年的最新版本是 Xdebug 2.7.0beta1,release 日期 2018-09-20,添加了对 PHP7.2 的支持。

Xdebug is an open source PHP debugger (i.e. a debug tool), which can be used to track, debug and analyze the running status of PHP programs. The latest version of Xdebug in 2018 is Xdebug 2.7.0 beta 1, released on September 20, 2018, adding support for php7.2.

很多 PHP 程序员调试使用 echo、print_r()、var_dump()、printf()等,其实对 于有较丰富开发经验的程序员来说这些也已经足够了,往往可以在程序执行的过程中,通过输出特定变量的值可以判断程序执行是否正确,甚至效率高低也可以 看出来(当然可能还需要使用一些时间函数)。

Many PHP programmers debug using echo and print_ r()、var_ Dump(), printf(), and so on. In fact, these are enough for programmers with rich development experience. In the process of program execution, the correctness of program execution can be judged by outputting the value of specific variables, and even the efficiency can be seen (of course, some time functions may be needed).

Xdebug 是一个开源的 PHP 程序调试工具,可以使用它来调试、跟踪及分析 PHP 程序运行状态,该工具需要配合编辑器来打断点、跟踪、调试及分析等,支持 Xdebug 的编辑器有 PhpStorm、VSCode 等。

Xdebug is an open source PHP program debugging tool, which can be used to debug, track and analyze the running state of PHP programs. The tool needs to cooperate with the editor to break points, track, debug and analyze. Editors supporting Xdebug include phpstorm, vscode, etc.

安装与设置

Installation and setup

安装

install

下载 xdebug

Download Xdebug

有两个版本带有 Non-thread-safe 和不带有 Non-thread-safe,主要是看你的 php 版本是否线程安全版本。

There are two versions with non thread safe and without non thread safe. It mainly depends on whether your PHP version is thread safe.

然后复制到你的 php 下的 ext 目录里,

Then copy it to your PHP ext directory,

修改 php.ini,增加如下信息:

Modification php.ini Add the following information:

zend_extension=”x:PHPextphp_xdebug-2.0.5-5.2.dll”

zend_ extension=”x:PHPextphp_ xdebug-2.0.5-5.2.dll”

;以下是参数

; here are the parameters

xdebug.auto_trace=on

xdebug.auto_ trace=on

xdebug.collect_params=on

xdebug.collect_ params=on

xdebug.collect_return=on

xdebug.collect_ return=on

xdebug.trace_output_dir=”x:Temp”

xdebug.trace_ output_ dir=”x:Temp”

xdebug.profiler_enable=on

xdebug.profiler_ enable=on

xdebug.profiler_output_dir=”x:Temp”

xdebug.profiler_ output_ dir=”x:Temp”

;x 为你的盘符

; X is your drive letter

DEBUG 是计算机排除故障的意思。马克 2 号(Harvard Mark II)编制程序的格蕾丝·霍珀(Grace Hopper)是一位美国海军准将及计算机科学家,同时也是世界最早的一批程序设计师之一。有一天,她在调试设备时出现故障,拆开继电器后,发现有只飞蛾被夹扁在触点中间,从而“卡”住了机器的运行。于是,霍珀诙谐的把程序故障统称为“臭虫(BUG)”,把排除程序故障叫 DEBUG,而这奇怪的“称呼”,竟成为后来计算机领域的专业行话。如 DOS 系统中的调试程序,程序名称就叫 DEBUG。DEBUG 在 windows 系统中也是极其重要的调试操作。

Debug is the meaning of computer troubleshooting. Grace hopper, a U.S. Navy Brigadier and computer scientist, was one of the first programmers in the world. One day, when she was debugging the equipment, she broke down the relay and found that a moth was clamped in the middle of the contact, thus “blocking” the operation of the machine. As a result, Hooper humorously referred to program failure as “bug” and troubleshooting as debug, which became a professional jargon in the field of computer science. Such as DOS system debugging program, the program name is called debug. Debug is also an important debugging operation in Windows system.


速搜资源网 , 版权所有丨如未注明 , 均为原创丨转载请注明原文链接:【速搜问答】Xdebug是什么
喜欢 (0)
[361009623@qq.com]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址