phpstorm - 如何设置 PhpStorm 来调试 OctoberCMS
问题描述
我试过调试栏,但这并没有给我足够的信息。
我还尝试使用与 Laravel 相同的方法设置 OctoberCMS 进行调试,但是当我设置断点时,它会停止在index.php
. 另外,我尝试了 PhpStorm 中的验证脚本,但它给出了 404 错误。
我正在尝试调试我正在开发的插件,使用像 PhpStorm 或 NetBeans 这样的 IDE 会更容易。任何帮助,将不胜感激。
我已经通过在 PHP 网页设置中设置 URL:/phpstorm/public 来设置 phpstorm 来调试 laravel 项目,但是当我在 octobercms 项目中尝试一些类似的东西时,我得到的只是等待连接,这意味着断点永远不会被击中这是我正在使用的设置
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port= 9000
xdebug.remote_autostart=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir ="c:/wamp64/tmp/"
xdebug.idekey=PHPSTORM
在我的 PHP 网页中
起始 URL: /octobercms/backend/rainlab/blog/Posts
我没有在服务器中设置路径映射,因为 Laravel 项目没有这样做我正在使用具有以下设置的 WAMP64 c:/wamp64/www/octobercms/
,这是我的虚拟主机文件
<VirtualHost *:80>
ServerName octobercms.test
DocumentRoot "c:/wamp64/www/octobercms"
<Directory "c:/wamp64/www/octobercms">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
DirectoryIndex index.php index.html
Require local
</Directory>
</VirtualHost>
关于我应该为 Octobercms 使用的设置的任何建议都会有所帮助
解决方案
我不确定这是否有帮助,但经过几次尝试让它工作后,我设法让 phpstorm 在我通过以下选择的断点处停止
- 如上所述设置 wamp
- 在 PHP 网页部分,我将 Start URL: 设置为 /octobercms/backend/rainlab/blog/posts 并应用设置
- 在 Posts.php 中设置断点
- 按下运行按钮
一切都很好,我现在可以尝试弄清楚为什么我的插件没有做它应该做的事情。
推荐阅读
- javascript - 如何在箭头函数中获取值
- laravel - 我是 Laravel 的新手。我得到了这个项目,但我不知道为什么它不显示图片
- django - 如何使用 django 在数据库中上传图像?
- firebase - Firebase函数onRequest未触发
- python - for循环如何在不使用readline()的情况下打印文本文件的所有行
- python - 如何在 Pandas 中合并包含数字数据的多列,但忽略空单元格
- text - 各种压缩软件程序的有趣行为
- python - 如何在 python 上的 openpyxl 的帮助下在现有的 xlsx 文件上写入文本?
- android - React Native 应用程序中的通知声音设置对话框,例如 WhatsApp
- c# - Visual Studio 2019 中的“项目位置”设置存储在哪里?