当我正在调试时,我想排除某些目录 - 例如,每次实例化一个类时,我的调试器都会进入Doctrine的ClassLoader :: loadClass()这很烦人...我尝试添加那些我想要排除的目录在Settings/PHP/Debug/Skipped Paths中,但这没有帮助......
我有一个带有getter和setter的对象,但当我将它传递给函数或迭代这些对象的数组时,我正在丢失对该对象的intellisense.
例如:
...
$personA = new Person(..);
$age = $personA->getAge(); // intellisense works.
$personArray = array($personA, $personB, .. );
foreach($personArray as $aPerson){
$aPerson->getAge(); // no intellisense here
}
doSomething($personA);
function doSomething($person){
$person->getAge() // no intellisense here
...
}
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?
我是否需要更改代码(转换等),缺少phpStorm设置?也许这不可能?
当我使用PhpStorm和xdebug调试php时,我已经搜索了很多这个问题,我发现有3或4个链接讨论这个问题,但没有一个是有用的.我的Xdebug的版本是2.2.3,而PhpStorm'version是6.03.我可以逐步调试每一行,除了这一行
$this->link = mysql_connect($this->dbserver, $this->dbuser, $this->dbpass);
Run Code Online (Sandbox Code Playgroud)
PhpStorm显示此错误:等待与ide键"14841"的传入连接.这是我的xdebug配置:
zend_extension="/usr/lib/xdebug.so"
xdebug.remote_autostart=1
xdebug.show_local_vars=1
xdebug.dump.GET=*
xdebug.dump.POST=*
xdebug.dump.SERVER=*
xdebug.auto_trace=On
; default trace output directory /tmp
xdebug.collect_vars = On
xdebug.trace_output_dir=/tmp
xdebug.collect_params=4
xdebug.collect_return=On
xdebug.profiler_enable=Off
; default trace output directory /tmp
;xdebug.profiler_output_dir=/tmp
;xdebug.profiler_enable_trigger=On
;test.php?XDEBUG_PROFILE
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/tmp"
xdebug.remote_connect_back=1
xdebug.idekey=PHPStorm
Run Code Online (Sandbox Code Playgroud)
我添加这些行"xdebug.remote_connect_back = 1 xdebug.idekey = PHPStorm",也抵制ide,它仍然是相同的我保证三个参数是正确的.
我喜欢在一个类中组织我的方法,以便受保护的函数位于底部,公共顶部.有时,我在文件的底部写了一个受保护的方法,然后我意识到它实际上是一个公共方法.
是否有键盘快捷键可以在不使用PhpStorm中的标准剪切(Ctrl+ X)/粘贴(Ctrl+ V)功能的情况下向上/向下移动方法?
我正在尝试调试此代码:
public function removeBlankLines() {
$this->qp->find('br');
} // <-- break point is here
Run Code Online (Sandbox Code Playgroud)
当我深入到$ this对象(使用phpStorm)时,我看不到我感兴趣的子数组.它只显示"无法获取属性"截图:

我正在"侦听调试连接"功能.我正在从命令行运行脚本.PHP版本:
[bwood@mbp ~]$ php -v
PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)
我正在从Vim切换到PHPStorm.在Vim中我有一个名为CtrlP的插件,它可以用于使用模糊逻辑搜索其路径的文件.
例如,搜索字符串" defaorderwid"
会建议文件"themes/defa ult/views/order/wid get.php"
(Sublime也具有此功能("Goto Anything"),可通过Ctrl+获得P.)
我怎样才能在PHPStorm中做类似的事情?我知道Ctrl+ Shift+ N搜索,但它只搜索没有路径的文件名.
这对我很重要,因为在当前项目中,我在不同的文件夹中有许多名为"widget.php"的文件.
我知道PHP7尚未发布,但是我想开始尝试,为了做到这一点,我最好继续使用PhpStorm.问题自然是它还没有语言支持.
我已经编译了PHP7源代码并将其作为解释器添加到PhpStorm,这令人惊讶地接受了,但这对语言级别没有任何影响.所以我的猜测是解释器用于调试,IDE使用自己的解析器来调试代码.
有没有人找到一种方法来获得对PHP7的支持?即使它是世界上最混乱的解决方案,也足够了.
嗨更新到最新的WebStorm,我现在收到此错误:
Error:(52, 14) TS1219:Experimental support for decorators
is a feature that is subject to change in a future release.
Set the 'experimentalDecorators' option to remove this warning.
Run Code Online (Sandbox Code Playgroud)
但在我的tsConfig experimentalDecorators中设置为true:
{
"version": "1.5.0",
"compilerOptions": {
//...,
"experimentalDecorators": true, // <======== HERE
//...,
},
"files": [
//...
],
"exclude": [ "node_modules" ]
}
Run Code Online (Sandbox Code Playgroud) 在 PhpStorm 中使用 git clone 时,我收到一条错误消息:
克隆失败
无法与 IP 地址端口 22 协商:未找到匹配的主机密钥类型。他们的报价:ssh-rsa,ssh-dss
无法从远程存储库读取。
请确保您拥有正确的访问权限并且存储库存在。
然后我制作了自己的 RSA 密钥并将其保存在我的计算机上;还在我想要获取 git clone 的服务器上(通过服务器主机)注册了它。我还降级了最新的 PhpStorm 版本。作为最后的手段,我还重置了计算机并重新安装了 PhpStorm。
但我的 PhpStorm 事件日志中仍然有该错误消息。
另外,当我第一次获得 PhpStorm 时,我可以轻松成功克隆,但几天后突然,我得到了类似的事件日志条目。
我能得到一个关于这个问题的解决方案吗,OTL