我已经搜索了很多关于IntelliJ IDEA 12和xdebug.file_link_format配置值的内容。
我什么都没找到.
是否可以使用带有IntelliJ IDEA或PhpStorm的xdebug文件链接?
发布于 2013-08-28 09:06:33
是和不。
no --对此没有适当的内置支持。观看这张票获得详细信息:http://youtrack.jetbrains.com/issue/IDEA-65879
是 --您可以找到一些解决办法,至少前面提到的票证有Mac的配方(使用AppleScript)或通过远程调用等等。
更新:从PhpStorm 8开始,您可以使用:
xdebug.file_link_format = "phpstorm://open?file=%f&line=%l" 发布于 2015-10-30 11:25:40
不是开箱即用,但可以让链接正常工作。在这个示例中,我使用的是协议PhpStorm,但是无论名称如何,它都能工作。
// note: edit the path, with backslashes escaped
var editor = '"c:\\Program Files (x86)\\JetBrains\\PhpStorm 143.434\\bin\\PhpStorm.exe" nosplash --line %line% "%file%"';
var url = WScript.Arguments(0);
var match = /^phpstorm:\/\/open\/\?file=(.+)&line=(\d+)$/.exec(url);
if (match) {
var file = decodeURIComponent(match[1]).replace(/\+/g, ' ');
var command = editor.replace(/%line%/g, match[2]).replace(/%file%/g, file);
var shell = new ActiveXObject("WScript.Shell");
shell.Exec(command.replace(/\\/g, '\\\\'));
}
editor.reg并导入到注册表。请注意,您再次需要双转义到上述文件的路径,并将其设置为保存您的文件的任何位置:REGEDIT4
[HKEY_CLASSES_ROOT\phpstorm]
@="URL:phpstorm Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\phpstorm\shell\open\command]
@="wscript \"C:\\path\\to\\run-editor.js\" \"%1\""
about:config中,创建一个名为network.protocol-handler.expose.phpstorm的“逻辑值”,并将其设置为falsephpstorm://open?file=somefile.html&line=123 -它应该在PhpStorm中打开。发布于 2015-12-16 22:56:04
根据@gapple的注释,这将使Xdebug链接到PhpStorm中的文件/链接:
xdebug.file_link_format = "phpstorm://open?file=%f&line=%l"
我在PhpStorm 10上测试了这一点,而且效果很好。
https://stackoverflow.com/questions/18482793
复制相似问题