具有symfony2项目的phpstorm xdebug [英] phpstorm xdebug with a symfony2 project

查看:71
本文介绍了具有symfony2项目的phpstorm xdebug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用xdebug和phpstorm调试symfony2应用程序.

I am trying to debug a symfony2 application with xdebug and phpstorm.

我的本​​地开发环境是带有apache2的Ubuntu 14.04,Xdebug版本是2.2.7

My local development environment is Ubuntu 14.04 with apache2 and Xdebug version is 2.2.7

我正在使用以下指南在另一个php(不是symfony2)项目上进行此工作:

I have this working on another php (not symfony2) projects with the following guides:

https://www.jetbrains.com/phpstorm/help/configuring -xdebug.html

https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm

当我执行小册子设置cookie并开始调试此symfony2项目phpstorm时,它检测到传入的连接(我接受),但是什么也没有发生.它不会在任何断点处停止.

When I execute the bookmarlet to set the cookie and start debugging this symfony2 project phpstorm detects the incoming connection (which I accept), but nothing else happens. It doesn't stop in any breakpoint.

我有symfony2 phpstorm插件.我试图禁用它,却一无所获.

I have the symfony2 phpstorm plugin. I tried to disable it and get nothing as well.

这个答案对我来说看起来不错,但这也不是什么招数

This answer looked good to me, but it didn't the trick either

我最后尝试做的是更改服务器调试配置,禁用路径映射.这样,phpstorm开始调试,但是会在app_dev.php文件中而不是我设置的任何断点处中断.

Last thing I tried is to change the Servers debug configuration, disabling path mappings. This way phpstorm starts debugging, but it breaks in app_dev.php file instead of any breakpoint I have set.

我被困在这里,任何想法都会让人信服

I am stuck here, any idea would be appreacite

更新

我没有提到的更多信息:

More information I didn't mention:

  • 我正在使用firefox,我正在尝试调试开发环境
  • 在我自己的控制器中,而不是在供应商的控制器中,断点是一个动作.

更新

这是我的xdebug配置

Here is my xdebug configuration

[XDebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port="9000"
xdebug.profiler_enable=1
xdebug.profiler_output_dir="<AMP home\tmp>"

推荐答案

这是一个映射问题.以下是完成窍门的步骤

It was a mapping problem. The following are the steps which did the trick

  1. 在设置">语言和"下禁用路径映射.框架> PHP>服务器>取消选中使用路径映射
  2. 开始调试
  3. 著名的远程文件路径'path/to/script/on/the/server.php'未映射到项目中的任何文件路径"终于出现
  4. 然后,我可以按照官方指南设置路径映射
  1. Disable path mapping under Settings > Languages & Frameworks > PHP > Servers > uncheck "Use path mappings
  2. Start debugging
  3. The famous "Remote file path ‘path/to/script/on/the/server.php’ is not mapped to any file path in project" finally appears
  4. Then I could follow the Troubleshooting section in official guide setting up path mappings

希望这对其他人有帮助

这篇关于具有symfony2项目的phpstorm xdebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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