首页 > 解决方案 > PhpStorm 调试 - 路径映射配置错误

问题描述

我正在跑步PhpStorm 2019.3.2 Build #PS-193.6015.48, built on January 22, 2020XAMPP 7.4.1.1。我的 php/xdebug 版本如下:

PHP 7.4.1 (cli) (built: Jan 16 2020 14:02:41) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v2.9.1, Copyright (c) 2002-2020, by Derick Rethans

我的 xdebug 配置php.ini如下所示:

[xDebug]
zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.idekey = "PHPSTORM"
xdebug.remote_log = "/tmp/xdebug.log"
; host where debug client is running
xdebug.remote_host = "localhost"
; debugger port
xdebug.remote_port = 9030
xdebug.profiler_enable = 0

在 PhpStorm 中,我有以下设置:

在此处输入图像描述

在此处输入图像描述

我正在使用 Chrome 扩展程序使用以下键设置 Debug-Cookie:

在此处输入图像描述

我的应用程序在/home/marcus/Desktop/Code/todoApp.

但是,在运行调试器时,我只得到:

Debug session was finished without being paused
                It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
                To figure out the problem check path mappings configuration for 'localhost' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu).
                Do not show again

有时调试器会跳转到我的 php 文件(15 秒后),有时不会。

为什么 PhpStorm 无法捕获 Xdebug 会话的任何建议?

感谢您的回复!

标签: phpphpstormxdebug

解决方案


推荐阅读