Ste*_*che 19 php symfony phpstorm
我应该如何配置PHPStorm以便在运行控制台命令时使用XDebug跟踪我的代码?
我知道我的调试配置正确,因为我可以调试Web请求并跟踪代码.我也可以跟踪常规的php命令行脚本,只要我设置这样的环境变量:
export XDEBUG_CONFIG="idekey=my-xdebug"
Run Code Online (Sandbox Code Playgroud)
但是,我无法跟踪/调试Symfony2控制台命令(与之一起运行app/console bundle:console_command).PhpStorm看到了连接,但是,似乎找不到正在运行的代码.我知道我的文件映射是正确的,因为Web请求完美无缺.
这可能吗?
Sir*_*ian 21
您应该提供SERVER_NAME和SERVER_PORT.你也应该启用xdebug.remote_autostart.试试这个:
SERVER_PORT=<Your server port> SERVER_NAME='<Your server name>' php -dxdebug.remote_autostart=On app/console test
Run Code Online (Sandbox Code Playgroud)
确保你已经在php.ini CLI版本中启用了xdebug,而不仅仅是apache/cgi php.ini.
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
17279 次 |
| 最近记录: |