- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为主题配置而苦苦挣扎
遵循本指南:https://www.strangebuzz.com/en/blog/step-by-step-debugging-with-xdebug-symfony-and-phpstorm
我已经安装了 XDEBUG
PHP 7.4.13 (cli) (built: Nov 28 2020 06:24:59) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans
这是我的调试配置
zend_extension=xdebug.so
xdebub.remote_enable=1
xdebug.remote_mode = debug
xdebug.client_port = 9003
并安装了xdebug extension in chrome
我已经在 Controller 中放置了一些 BreakPoint 来检查它是否工作......没有任何反应
如果我尝试验证调试服务器配置,这就是错误
我认为是因为 symfony 中的安全配置,但我也“打开”了子文件夹(公共(public)/测试)的访问权限,但没有成功
有人可以帮我做这个配置吗?谢谢
[编辑]
按照@LazyOne 的建议,我删除了 xdebug 配置中有错字的行
zend_extension=xdebug.so
xdebug.remote = debug
xdebug.client_port = 9003
xdebug.log=/media/leandro/Elements/Progetti/s4fgel/xdebug.log
我也试过修改公共(public)文件夹中的 index.php 添加
if (PHP_SAPI == 'cli-server') {
// To help the built-in PHP dev server, check if the request was actually for
// something which should probably be served as a static file
$file = __DIR__ . $_SERVER['REQUEST_URI'];
if (is_file($file)) {
return false;
}
}
如 phpstorm documentation 中所建议,为了验证调试器的配置,但结果是一个空白网页(public/test.php -> echo "test")。
[编辑 2]这是我从 phpinfo 打印的 XDEBUG 配置
[编辑 3]我已经将 xdebug.idekey=*PHPSTORM*
添加到 xdebug 配置中,但是如果没有 BP,脚本会在每次请求时多次停止。这是 XDEBUG 到请求页面的完整日志,直到我到达第一个 BP
[38952] Log opened at 2020-12-17 13:46:02.963623
[38952] [Step Debug] INFO: Connecting to configured address/port: localhost:9003.
[38952] [Step Debug] INFO: Connected to debugging client: localhost:9003 (through xdebug.client_host/xdebug.client_port). :-)
[38952] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///home/leandro/.symfony/php/7156db8ed3dfc7f503f23103615bf450f5f1947e-router.php" language="PHP" xdebug:language_version="7.4.13" protocol_version="1.0" appid="38952" idekey="PHPSTORM"><engine version="3.0.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>
[38952] [Step Debug] <- feature_set -i 1 -n show_hidden -v 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
[38952] [Step Debug] <- feature_set -i 2 -n max_depth -v 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
[38952] [Step Debug] <- feature_set -i 3 -n max_children -v 100
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
[38952] [Step Debug] <- feature_set -i 4 -n extended_properties -v 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="extended_properties" success="1"></response>
[38952] [Step Debug] <- feature_set -i 5 -n notify_ok -v 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="notify_ok" success="1"></response>
[38952] [Step Debug] <- feature_set -i 6 -n resolved_breakpoints -v 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="6" feature="resolved_breakpoints" success="1"></response>
[38952] [Step Debug] <- stdout -i 7 -c 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="7" success="1"></response>
[38952] [Step Debug] <- status -i 8
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="status" transaction_id="8" status="starting" reason="ok"></response>
[38952] [Step Debug] <- step_into -i 9
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="9" status="break" reason="ok"><xdebug:message filename="file:///home/leandro/.symfony/php/7156db8ed3dfc7f503f23103615bf450f5f1947e-router.php" lineno="12"></xdebug:message></response>
[38952] [Step Debug] <- eval -i 10 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="10"><property type="bool"><![CDATA[0]]></property></response>
[38952] [Step Debug] <- eval -i 11 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="11"><property type="bool"><![CDATA[1]]></property></response>
[38952] [Step Debug] <- eval -i 12 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="12"><property type="string" size="9" encoding="base64"><![CDATA[MTI3LjAuMC4x]]></property></response>
[38952] [Step Debug] <- eval -i 13 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9QT1JUJ10p
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="13"><property type="string" size="5" encoding="base64"><![CDATA[MzU5MDM=]]></property></response>
[38952] [Step Debug] <- eval -i 14 -- KHN0cmluZykoJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10p
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="14"><property type="string" size="44" encoding="base64"><![CDATA[L3JlY3VwZXJvY3JlZGl0aS9yYXRlaXp6YXppb25pL2dldC9yYXRlb2RhdGE=]]></property></response>
[38952] [Step Debug] <- breakpoint_set -i 15 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 445
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="15" id="389520386" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 16 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 473
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="16" id="389520387" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 17 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 409
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="17" id="389520388" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 18 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 420
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="18" id="389520389" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 19 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 430
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="19" id="389520390" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 20 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 443
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="20" id="389520391" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 21 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 483
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="21" id="389520392" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 22 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 482
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="22" id="389520393" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 23 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 411
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="23" id="389520394" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 24 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 452
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="24" id="389520395" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 25 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 459
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="25" id="389520396" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 26 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 478
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="26" id="389520397" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 27 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 426
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="27" id="389520398" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 28 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 476
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="28" id="389520399" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 29 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 416
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="29" id="389520400" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 30 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 460
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="30" id="389520401" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 31 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 418
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="31" id="389520402" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 32 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 439
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="32" id="389520403" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 33 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 484
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="33" id="389520404" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 34 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 422
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="34" id="389520405" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 35 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 475
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="35" id="389520406" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 36 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 480
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="36" id="389520407" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 37 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 406
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="37" id="389520408" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 38 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 448
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="38" id="389520409" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 39 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 454
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="39" id="389520410" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 40 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 467
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="40" id="389520411" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 41 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 438
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="41" id="389520412" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 42 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 456
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="42" id="389520413" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 43 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 428
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="43" id="389520414" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 44 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 413
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="44" id="389520415" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 45 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 415
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="45" id="389520416" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 46 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 464
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="46" id="389520417" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 47 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 470
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="47" id="389520418" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 48 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 433
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="48" id="389520419" resolved="unresolved"></response>
[38952] [Step Debug] <- breakpoint_set -i 49 -t line -f file:///media/leandro/Elements/Progetti/s4fgel/src/Model/FintelUtility/Rateizzazione/Manager/RateizzazioneManager.php -n 434
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="49" id="389520420" resolved="unresolved"></response>
[38952] [Step Debug] <- stack_get -i 50
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="50"><stack where="{main}" level="0" type="file" filename="file:///home/leandro/.symfony/php/7156db8ed3dfc7f503f23103615bf450f5f1947e-router.php" lineno="12"></stack></response>
[38952] [Step Debug] <- stack_get -i 51
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="51"><stack where="{main}" level="0" type="file" filename="file:///home/leandro/.symfony/php/7156db8ed3dfc7f503f23103615bf450f5f1947e-router.php" lineno="12"></stack></response>
[38952] [Step Debug] <- context_names -i 52
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="52"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>
[38952] [Step Debug] <- eval -i 53 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzZiYjY5Y2NmLTBmMjEtNDY5Zi1hNGZhLWJhODBhNzM4MzAxYSddPSR0aGlzLT5pYU1Q
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="53" status="break" reason="ok"><error code="206"><message><![CDATA[error evaluating code]]></message></error></response>
[38952] [Step Debug] <- eval -i 54 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJ2VmMTRjODFkLWEwYjQtNDZmMy04NThjLTRiYjQ3NzkxY2JlOSddPSRmYXR0dXJhRmdkLT5nZXRJbXBvcnRvQXBlcnRvTWF0ZXJpYVByaW1hUmVhbGUoKQ==
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="54" status="break" reason="ok"><error code="206"><message><![CDATA[error evaluating code]]></message></error></response>
[38952] [Step Debug] <- eval -i 55 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJ2M0MGFkMmM1LTAwZDMtNDc5MC04MmM5LTJiZTQ0NDJmMzBjNSddPSRpbXBvcnRvUmF0YUNvbnN1bWF0bw==
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="55"><property type="null"></property></response>
[38952] [Step Debug] <- eval -i 56 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJ2Y4ZTJmMjk4LTZlZmMtNDkxNC05MmRiLWMwMWNmMGFhOTAxMSddPSRpbXBvcnRvUmF0YQ==
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="56"><property type="null"></property></response>
[38952] [Step Debug] <- eval -i 57 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzhlOTI2MzQ3LTBjZTYtNDhiMS1hN2JjLWFmNTFlMGYxYjMxMCddPSR0aGlzLT5pYUNS
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="57" status="break" reason="ok"><error code="206"><message><![CDATA[error evaluating code]]></message></error></response>
[38952] [Step Debug] <- eval -i 58 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzIxZjZlODdkLTRhNjktNDQ0ZS1hZjQ0LTNlMjVhNDVlODU4ZSddPSRpbnRlcmVzc2k=
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="58"><property type="null"></property></response>
[38952] [Step Debug] <- eval -i 59 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzAyMDE5NWIxLTRlOWUtNGMxZi04MmMwLTdiMDJiZTU0ODNhMCddPSRyYXRhLT5nZXRJbnRlcmVzc2koKQ==
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="59" status="break" reason="ok"><error code="206"><message><![CDATA[error evaluating code]]></message></error></response>
[38952] [Step Debug] <- context_get -i 60 -d 0 -c 0
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="60" context="0"><property name="$IDE_EVAL_CACHE" fullname="$IDE_EVAL_CACHE" type="array" children="1" numchildren="3" page="0" pagesize="100"><property name="c40ad2c5-00d3-4790-82c9-2be4442f30c5" fullname="$IDE_EVAL_CACHE["c40ad2c5-00d3-4790-82c9-2be4442f30c5"]" type="null"></property><property name="f8e2f298-6efc-4914-92db-c01cf0aa9011" fullname="$IDE_EVAL_CACHE["
[38952] [Step Debug] <- context_get -i 61 -d 0 -c 1
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="61" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="1" numchildren="2" page="0" pagesize="100"><property name="XDEBUG_SESSION" fullname="$_COOKIE["XDEBUG_SESSION"]" type="string" size="8" encoding="base64"><![CDATA[UEhQU1RPUk0=]]></property><property name="PHPSESSID" fullname="$_COOKIE["PHPSESSID"]" type="string" size="26" enc
[38952] [Step Debug] <- context_get -i 62 -d 0 -c 2
[38952] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="62" context="2"></response>
最佳答案
好吧,最后我发现使用 symfony server:start
客户端在 /home/user/.symfony/php
文件夹中创建了一个临时路由器(用户是这里的“约定”)这意味着在 PhpStorm 中,您必须启用“外部连接”下的“在 PHP 脚本的第一行中断”选项
这是因为创建的路由器相对于项目是外部的。
没有映射解决方法有效。
所以我暂时发现,如果你启动一个内置于网络服务器的本地 php,它就可以正常工作,所以
cd /path/to/symfony_project/pulic
php -S localhost:8000
这里是 php v7.4
和 Symfony 5.2
的完整过程:
1 - 安装 XDEBUG
在我的例子中,它安装了 XDEBUG v3.0.1
sudo apt install xdebug
检查是否安装了 php -v
2 - 配置 XDEBUG找到你的 xdebug.ini,在我的例子中是 /etc/php/7.4/mods-available/xdebug.ini
并配置
zend_extension=xdebug.so
xdebug.remote = debug
xdebug.client_port = 9003
# It can be overridden with parameters but in default mode i want this using only PHPSTORM
xdebug.idekey=*PHPSTORM*
# Optional if you want a log
# xdebug.log=/path/to/xdebug.log
3 - 安装浏览器扩展检查here您浏览器的扩展名。右键单击扩展并将 Ide Key 设置为 PHPSTORM,然后单击“调试”。
4 - 启动本地网络服务器正如我所说,我使用内置的 php 服务器,所以
cd /path/to/symfony_project/pulic
php -S localhost:8000
5 - 使用 Phpstorm 检查配置
在 IDE 中 运行 > Web 服务器调试验证
第一个参数应该是您的公用文件夹的路径,然后单击验证。
6 - 开始调试
就是这样,放置一些断点,然后开始调试您的应用程序
关于symfony - PhpStorm Xdebug Symfony 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65326808/
自从我开始使用 PhpStorm 以来,我在编辑器中间有一条非常微妙的垂直线,表示 120 个字符的行长度限制。 那太棒了,所有的爵士乐,直到最近我开始有第二行,这表明 80 个字符的限制。 我的问题
PhpStorm 保留一个 Local History所有文件。 有谁知道这些文件存储在哪里? 最佳答案 本地历史记录与其他索引/缓存文件一起存储 -- 如果您想单独复制/备份它,您将无法自己阅读它
经过多次搜索,似乎我没有选择在PHP中对齐变量的连续分配。我可以在数组中对齐键/值对,仅此而已。 似乎旧版本的PHPStorm都有它。 PHPStorm 9有可能吗?如果是这样,怎么办?如果不是,它真
我已经在PHPStorm中安装了nodejs插件,并设置了yuicompressor npm来最小化css / js。 我使文件监视程序正常工作,以便每当我对项目中的.css / .js文件进行更改时
有没有办法让phpStorm更新docblock的内容?例如,如果我有以下代码 //----------------------------------------------------------
有没有简单的方法可以在 phpStorm 中将制表符转换为空格?目前我使用正则表达式替换\t->\s\s\s\s 并想知道是否有简单的方法可以做到这一点,因为我与 magento 合作并且扩展开发人员
我使用 PhpStorm。我想制作代码片段,然后为它们分配快捷方式。我可以在 NetBeans 中做到这一点,但在 PhpStorm 中我不知道如何制作它们。 例如,要在 NetBeans 中添加 c
PhpStorm 会警告 PHP 代码中的许多问题(潜在的或实际的问题)。我经常看到这样的代码: function doSomething($a, $b) { // ... } $value
PhpStorm 在土耳其语单词下方显示黄线。 如何忽略评论中的所有拼写错误。 最佳答案 设置(Mac 上的首选项)|检查 |拼写 |拼写错误 您可以配置此检查以忽略评论。 但是理想情况我建议添加该
在大多数 Windows 应用程序中,我可以使用组合 Shift + F10 来复制鼠标右键单击。 Shift + F10 被映射为在 PHPStorm 中调试当前文件的快捷方式。我查看了设置中的映射
是否可以在 Phpstorm 中启用水平滚动? 我在搜索设置时什么也没找到。 最佳答案 您是否尝试过按住 SHIFT + 鼠标滚动? 我从版本 8.0.3 到 9.0.2 对其进行了测试,它工作得很好
PhpStorm 中是否可以有多个窗口(对于同一项目)?如果是,怎么做? 最佳答案 PhpStorm 仅支持每个项目一个框架。 请注意,您可以将编辑器选项卡拖到主窗口之外以为编辑器创建另一个窗口。如果
在 PhpStorm 中,有一个扩展选择 ctrl + w 的快捷方式。有没有选择当前所有行的快捷方式?我在 Sublime 中寻找类似于 ctrl + l 的东西? 最佳答案 此类操作可用.....
我在 PhpStorm 中定义了几个命令行工具。 有没有办法创建自定义按钮来调用这个脚本? 我在首选项面板中找不到任何设置。 最佳答案 创建命令并在 Show in 部分选中所有内容。您可以在菜单 T
最近在一个全新的 Ubuntu 安装上,突然 PHPStorm 停止允许我使用带有葡萄牙语口音的单词。 例如: Trying TILDE+A should result in: ã Instead i
我使用 include 在我的 php 脚本中包含了一些文件并且我正在使用我包含的文件中定义的变量和函数。有没有办法以这种方式配置 PhpStorm 以在建议列表中显示此类变量? 最佳答案 2021
我正在尝试将 Phalcon 开发人员工具与 phpstorm 集成。有一个video here ,但由于我所在的位置,我无法查看它。 我在文档中找不到任何其他可用的引用,如何实现此目的? 最佳答案
在 PhpStorm(和其他 JetBrains IDE)中,是否可以将函数属性作为文件/资源路径? 例如在这个函数中: function mix($file): string { // ch
鉴于 PhpStorm 提供的出色的编码指导,我对字符串中使用的变量缺乏变量名称建议感到有些困惑。 $variable = "something"; // A: $variable; // B: $s
目标很简单 - 我想一次打开所有修改过的文件。有没有快速的方法来做到这一点? 目前我正在使用 Alt + 9 然后打开文件,但这还不够快(按快捷方式,全选,按 Enter,手动打开“未版本化”的文件)
我是一名优秀的程序员,十分优秀!