XDebug提供配置指令"xdebug.profiler_enable_trigger",允许通过在通过HTTP调用脚本时传递GET或POST参数"XDEBUG_PROFILE"来激活分析.如果您不想对所有脚本进行性能分析,但仅针对少数特殊情况而不总是更改PHP配置,则这很方便.
有没有办法实现命令行PHP程序的相同行为?我试图将"XDEBUG_PROFILE"作为命令行参数传递,但它不起作用.
通常,分析命令行PHP运行良好,但我希望具有与浏览器和HTTP服务器相同的每次调用灵活性.
有什么建议?
我在VSCode上用PHP调试配置成功.
我的问题是当我运行项目时,它总是在函数中出错:
protected function getJsonPayload($payload)
{
$payload = json_decode(base64_decode($payload), true);
// If the payload is not valid JSON or does not have the proper keys set we will
// assume it is invalid and bail out of the routine since we will not be able
// to decrypt the given value. We'll also check the MAC for this encryption.
if (! $this->validPayload($payload)) {
throw new DecryptException('The payload is invalid.');
}
if (! $this->validMac($payload)) {
throw new DecryptException('The MAC is invalid.'); …Run Code Online (Sandbox Code Playgroud) 我找不到在Visual Studio代码上运行php的方法,有谁知道怎么做?
重复:
是的,但与此有点不同.
脚步:
我按照以下步骤在VS Code中配置php.


<? echo "My First PHP site in VSCode."; ?>我现在创建的外部php文件

题:
我在上面的步骤中在vs代码中配置php我做错了什么.请通过简单的步骤解释我,这样我就可以轻松实现目标.提前致谢.
当 xdebug 提供堆栈跟踪时,它可以创建链接以在文本编辑器中的特定行打开文件。例如,如果安装了 subl 处理程序,以下配置将在 Sublime 中打开文件:
xdebug.file_link_format="subl://open?url=%f&line=%l"
Run Code Online (Sandbox Code Playgroud)
如何为 VS Code 设置 file_link_format?