Я не могу установить отладку из CLI на localhost (Запустить текущую открытую конфигурацию скрипта в PHP Debug) Сценарий запускается, но игнорирует все точки останова. В противном случае отладка PHP в браузере работает нормально.
Мои настройки, запуск. json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"externalConsole": false,
"port": 9000,
"stopOnEntry": true,
"hostname": "localhost",
"runtimeExecutable": "C:\\wamp64\\bin\\php\\php7.4.1\\php.exe",
"env": {"XDEBUG_CONFIG" : "remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0"
},
"runtimeArgs": ["-dxdebug.remote_enable=1", "-dxdebug.remote_mode=req", "-dxdebug.remote_port=9000", "-dxdebug.remote_host=127.0.0.1", "-dxdebug.remote_connect_back=0"
]
}
]
}
Раздел Xdebug в php .ini:
[xdebug]
zend_extension="c:/wamp64/bin/php/php7.4.1/zend_ext/php_xdebug-2.9.0-7.4-vc15-x86_64.dll"
xdebug.remote_enable = On
;xdebug.remote_autostart = 1
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = Off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp64/tmp"
xdebug.show_local_vars=0
xdebug.remote_log = "c:/wamp64/tmp"
;xdebug.remote_host=localhost
Я попытался поэкспериментировать с различными настройками, как вы видите из настроек, но безрезультатно.
РЕДАКТИРОВАТЬ: это файл журнала отладки:
<- launchResponse
Response {
seq: 0,
type: 'response',
request_seq: 2,
command: 'launch',
success: true
}
<- outputEvent
OutputEvent {
seq: 0,
type: 'event',
event: 'output',
body: { category: 'stdout', output: 'gotovo!' }
}
gotovo!
<- terminatedEvent
TerminatedEvent { seq: 0, type: 'event', event: 'terminated' }
-> disconnectRequest
{
command: 'disconnect',
arguments: { restart: false },
type: 'request',
seq: 3
}