PHPstorm-无法在blade.php文件中设置断点 [英] PHPstorm - Unable to set breakpoints in blade.php files

查看:84
本文介绍了PHPstorm-无法在blade.php文件中设置断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Laravel应用程序,可以很好地调试我的控制器php文件,但我想也调试一下blade.php文件.在我的当前设置下,Ive遵循了所有jetbrains建议的Laravel设置, > https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm#LaravelDevelopmentusingPhpStorm-DebuggingLaravelApplicationswithPhpStorm ),但仍然不允许我在blade.php文件中设置断点.

I'm working on a Laravel application and can debug my controller php files fine, but Id like to also debug the blade.php files. With my current setup Ive followed all of jetbrains recommend settings for Laravel, (https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm#LaravelDevelopmentusingPhpStorm-DebuggingLaravelApplicationswithPhpStorm) but it is still not allowing my to set breakpoints in the blade.php files.

我可能会缺少什么?

推荐答案

放入

<?php xdebug_break(); ?>

进入刀片文件效果很好. 即使在我的测试中,在某些情况下,PHPstorm也会跳到下一个PHP语句.

into your blade file works pretty well. Even in my tests, PHPstorm jumps to the next PHP statement in some cases.

为什么有效:

Laravel将刀片文件处理为缓存文件夹中的普通PHP文件.但是,PHP语句xdebug_break();将在那里传输,并导致程序停止在您想要的位置(在缓存文件中).

Laravel processes the blade file to a normal PHP file in the cache folder. But the PHP statement xdebug_break(); will be transferred there and cause the program to halt at the position you want it to (in the cache file).

这篇关于PHPstorm-无法在blade.php文件中设置断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆