首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IntelliJ和xDebug - xdebug.file_link_format

IntelliJ和xDebug - xdebug.file_link_format
EN

Stack Overflow用户
提问于 2013-08-28 08:22:53
回答 5查看 2.7K关注 0票数 4

我已经搜索了很多关于IntelliJ IDEA 12和xdebug.file_link_format配置值的内容。

我什么都没找到.

  • 使用"idea“、"intellij”、"txmt“等协议或其他协议不起作用。
  • 我没有发现一个注册IntelliJ协议的插件.

是否可以使用带有IntelliJ IDEA或PhpStorm的xdebug文件链接?

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2013-08-28 09:06:33

是和不。

no --对此没有适当的内置支持。观看这张票获得详细信息:http://youtrack.jetbrains.com/issue/IDEA-65879

--您可以找到一些解决办法,至少前面提到的票证有Mac的配方(使用AppleScript)或通过远程调用等等。

更新:从PhpStorm 8开始,您可以使用:

代码语言:javascript
复制
xdebug.file_link_format = "phpstorm://open?file=%f&line=%l" 
票数 8
EN

Stack Overflow用户

发布于 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的“逻辑值”,并将其设置为false
  • 在火狐中打开一个这样的链接,例如phpstorm://open?file=somefile.html&line=123 -它应该在PhpStorm中打开。
票数 1
EN

Stack Overflow用户

发布于 2015-12-16 22:56:04

根据@gapple的注释,这将使Xdebug链接到PhpStorm中的文件/链接:

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

我在PhpStorm 10上测试了这一点,而且效果很好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18482793

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档