简体   繁体   English

PhpStorm 不会调试

[英]PhpStorm won't debug

I've installed PhpStorm hoping to debug a WordPress site running on my workstation on top of Local ( https://localwp.com ), which comes with an "Xdebug + PhpStorm" plugin I have installed.我已经安装了 PhpStorm,希望能在本地( https://localwp.Z4D236D9A2D102C5FE6AD1C50 IDA4BEC50Z )上调试运行在我的工作站上的 WordPress 站点,该插件带有“IDA4BEC50Z”插件

The "zero configuration" has not worked for me. “零配置”对我不起作用。 I set breakpoints and request a page in the browser but the breakpoints never get hit.我在浏览器中设置断点并请求一个页面,但断点永远不会被击中。

What else do I need to make this work?我还需要什么来完成这项工作?

Appendix I附录一

  • PHP version 7.3.5 PHP 版本 7.3.5
  • PhpStorm 2020.1.3 PhpStorm 2020.1.3

php.ini php.ini

[xdebug]
zend_extension = /Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.3.5+8/bin/darwin/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so

xdebug.remote_enable=1
xdebug.remote_connect_back=Off
xdebug.remote_port="9000"
xdebug.profiler_enable=0

In order for PhpStorm / Local / Xdebug combo to work, you'll need to为了使 PhpStorm / Local / Xdebug 组合工作,您需要

  • Start Local本地启动
  • Install the addon for Xdebug from within Local从本地安装 Xdebug 插件
  • Restart Local重启本地
  • Start a site in Local (ie test )在本地启动站点(即test
  • Go to Utilities and click "Add run configuration to PhpStorm" (ignore the error that'll pop up) Go 到 Utilities 并点击“Add run configuration to PhpStorm”(忽略会弹出的错误)
  • Start PhpStorm and open ~/Local Sites/test/app/public/app/public .启动 PhpStorm 并打开~/Local Sites/test/app/public/app/public THAT'S IMPORTANT to open the public folder (that contains your WP root)打开公用文件夹(包含您的 WP 根目录)很重要
  • You'll see a "LOCAL" xdebug dropdown on the top right in PhpStorm你会在 PhpStorm 的右上角看到一个“LOCAL”xdebug 下拉菜单
  • You're all set!你都准备好了!

open /app/public from within PhpStorm从 PhpStorm 中打开/app/public

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM