- 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/
我开始从事一个用 Symfony 2.8 编写的大型项目。将整个项目升级到 SF 3 需要数百小时,现在还不可能。我想到了一个想法,将 symfony/symfony 包解压到它替换的单个包中(com
我在提交表单后使用 FOSUserEvents,但订阅者调用了两次。 这样我的验证码第一次有效第二次无效 这是我的代码 router = $router; $this->request
我有以下路线: blog_show: path: /test/123 defaults: { _controller: TotalcanBravofillBundle:Te
我是测试新手。我想测试我的功能。我已经成功安装了 phpUnit。我在互联网上查看了许多教程。但我无法获得有关测试的正确信息。这是我的功能代码: public function loginAction
我正在尝试重现 facebook batch requests 的行为在他们的图形 api 上运行。 所以我认为最简单的解决方案是在 Controller 上向我的应用程序发出几个请求,例如: pub
在 Symfony Progress Bar documentation有一个超酷酒吧的示例图像。不幸的是,看起来文档的其余部分没有解释如何获得这样的结果。 这是图片,以防您错过: 我怎么才能得到它?
我使用Finder发送假脱机电子邮件,但是自动名称生成器将点放在文件名中,有时它们出现在文件的开头。 查找程序似乎无法获取具有该名称的文件-那些文件被隐藏了……有人经历过这种行为吗?有什么建议如何使用
我正在尝试进行 LDAP 身份验证,我目前遇到此类错误: ServiceNotFoundException: The service "security.firewall.map.context.ma
有没有办法验证和检查集合数组是否为空。我已经尝试过: /** * @Assert\NotBlank() * @Assert\Length( min = 1) */ protected $work
使用Smyfony2和Doctrin2,可以使用以下示例创建数据固定装置:http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/i
我看到在大多数Symfony 2示例中,例如,不存在记录时,Symfony 2会引发异常。我认为这种方法对最终用户不友好。为什么有人更喜欢引发异常而不在Flashbag上添加一些错误消息? 最佳答案
我对项目中的以下服务有疑问: app.security.guardAuthenticatorLoginPassword: class: AppBundle\Security\LoginPa
symfony缓存和登录Docker容器存在问题。 Web服务器从www-data用户和组执行,当我使用docker上安装的php从docker容器中清除symfony缓存时,它从root执行。 因此
我想了解 symfony 中的服务 我已阅读http://symfony.com/doc/2.3/book/service_container.html#creating-configuring-se
因为我对 Symfony 和 Doctrine 还很陌生,所以我有一个可能很愚蠢的问题;-) 有人可以用简单的词语向我解释集合(尤其是实体中的ArrayCollections)吗?它是什么以及何时以及
我收到了这个表格: {{ form_start(form) }} {{ form_end(form) }} 我想检查用户是否登录,我这样做了: {% if is_g
我的网站已准备好部署,我正在尝试将其设置为在线。 一些信息: 主持人是 OVH。 它不允许 SSH,我必须使用 FTP 发送文件。也没有命令行。 我现在希望能够在子目录中设置网站:/www/test(
过去几个月以来,我一直在尝试与symfony合作。昨晚我自动删除了不需要的存储库。之后,我无法使用symfony命令创建新的symfony项目。当我在终端中运行Symfony new Security
In the environnement variable, then in system variable, I edited the path and added在环境变量中,然后在系统变量
我们有一个 Symfony 1.4 应用程序,想升级到 Symfony 4。是否有可能或者我们必须重新编程该应用程序? 我们询问了我们附近的一家软件公司,他们告诉我们必须重新编写应用程序。 最佳答案
我是一名优秀的程序员,十分优秀!