How to correctly configure xdebug.file_link_format?

痴心易碎 提交于 2019-12-13 14:41:45

问题


I want error messages outputed by xdebug to show up as links in the browser so I can open them quickly using TextMate.

I added the following line to my php.ini file, restarted apache and added a few syntax errors to one of my php scripts but the file name is not showing up as a link. Xdebug is otherwise working fine on my system.

xdebug.file_link_format="txmt://open/?url=file://%f&line=%l"

Are there additional configurations that I need to set up to make this work?

Edit: Here are all the xdebug related configuration settings in my php.ini:

[xdebug]
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.file_link_format="txmt://open/?url=file://%f&line=%l"

回答1:


I am running snow leopard with xdebug 2.1.0RC1 and can click errors as links that take me to the correct line in textmate so it is possible to have this working.




回答2:


i found solution: so just replace the xdebug wich comes with MAMP with the lastest one frome here

http://code.activestate.com/komodo/remotedebugging/

then move the link part above the extension part like

[xdebug] xdebug.file_link_format="txmt://open?url=file://%f&line=%1" zend_extension="/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

;xdebug.remote_enable=1 ;xdebug.remote_host=localhost ;xdebug.remote_port=9000 ;xdebug.remote_autostart=1

than happy happy ;-)




回答3:


I realize this is unrelated, but since this question is the top result on most of my Google searches, I figured it may be helpful for someone else.

I put together this quick tutorial on getting xdebug.file_link_format to work with Netbeans on Windows. You could easily modify the .bat file for any IDE, however.

xdebug.file_link_format for Netbeans on Windows



来源:https://stackoverflow.com/questions/2859186/how-to-correctly-configure-xdebug-file-link-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!