我怎样才能让 Xdebug 在 Laravel 的 PHPStorm 中工作?

How can I get Xdebug working in PHPStorm with Laravel?

我正在关注 PHPStorm 的 Laracast 并设置 xdebug。当我在 laravel 项目的控制器上 运行 xdebug 时,它会提示我安装 chrome 扩展。如果我安装上述 chrome 扩展,我只会得到一个浏览器 window 说明 Fatal Error: Class 'BaseController' not found 。 Jeff 没有提到这个扩展,评论中也没有提到任何人。结果,除了 "Connected to JetBrains Chrome Extension",我在调试器中没有看到任何东西。是什么赋予了?我完全按照教程做了。

我遵循这个 jetbrains guide 加上代理隧道 9000 端口。

对我来说代理/隧道化调试器连接就可以了。

我需要像这样将端口 9000 连接到我的本地计算机:

ssh -R 9000:localhost:9000 vagrant@192.168.50.10  //or wathever ip of you homestead

而不是 运行 homestead sh 用于登录我的 homestead 机器。

希望对你有用。