如何更改 PhpStorm 中的 XDEBUG_CONFIG idekey 值?

How to change XDEBUG_CONFIG idekey value in PhpStorm?

我已将 PhpStorm 配置为连接到远程 Web 服务器。我正在 运行ning phpunit 进行单元测试。我有 xdebug 运行ning 并创建了一个用于调试的 ssh 隧道。我知道 xdebug 是 运行ning,因为我可以通过单击 运行 按钮(打开侦听 PHP 调试连接)。但是,如果我改为在 PhpStorm 中选择“调试”选项,则会出现连接错误。

向 PhpStorm 日志文件启用调试消息我看到发送的命令是:

DEBUG - ellij.ssh.SshConnectionService - Executing SSH command: 
cd /[path to project files]; 
exec env "IDE_PHPUNIT_CUSTOM_LOADER"="/[path to autoloader]/autoload.php" "JETBRAINS_REMOTE_RUN"="1" "XDEBUG_CONFIG"="idekey=17650" /usr/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9002 -dxdebug.remote_host=[ip address] /[path to phpunit]/phpunit/phpunit --configuration /[path to phpunit xml file]/phpunit.xml --filter '/(::myTestClassMethod)( .*)?$/' 'another method being tested' /[path to unit test file]/myUnitTest.php --teamcity within SshjSshConnection([blah]@[foo])@bar  

我的 php.ini 设置需要 idekey=PHPSTORM,但我在命令行中看到一个数字键,每次尝试都会不断变化。

我假设 idekey 的这两个值需要匹配。如果那是正确的,我该怎么做?

谢谢

他们不需要匹配。事实上,PhpStorm 只是在这里覆盖它,以便它可以匹配它所期望的。

我不明白为什么会这样,因为 IDE Keys(目前)仅与 DBGp proxies.[=11 结合使用=]

由于您没有描述 "connection errors" 是什么,所以目前还无法真正回答这部分问题。