Xdebug для php в коде Visual Studio – как настроить и разрешить точки остановаPhp

Кемеровские программисты php общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Xdebug для php в коде Visual Studio – как настроить и разрешить точки останова

Сообщение Anonymous »

Я прочитал почти все сообщения о настройке pgp xdebug для кода VS, но не нашел решения. Я установил код VS на новый ноутбук (это актуально, потому что я знаю, что еще установлено, и нет нескольких экземпляров php - но, похоже, есть!!)
Я установил XAMP, который включает php 8.2.12, на win11 ПК.
Показывает php -v
Copyright (c) The PHP Group
Zend Engine v4.2.12, Copyright (c) Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans`
the PHP.ini says `zend_extension = c:\xampp\php\ext\php_xdebug.dll
xdebug.start_with_request = yes
xdebug.client_port = 9900
xdebug.client_host = 127.0.0.1
xdebug.default_enable=1
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_log="C:\xampp\apache\logs\xdebug.log"

Настройки json в VScode:
"workbench.colorTheme": "Visual Studio Light",
"debug.allowBreakpointsEverywhere": true,
"php.executables": { "v8.2": "//xampp//php//php.exe" },
"launch": {
"configurations": [ {
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9900,
"pathMappings": {
"c:/xampp/php/ext": "${workspaceFolder}"
}
}
]]
}
}`

According to all the posts Ive read that should do it but on trying to debug a simple php I get this error

`Failed loading C:\php\ext\php_xdebug-2.6.1-7.2-vc15-nts-x86_64.dll`

Now Im no expert but this seems to be saying its trying to run php 7.2 and wants the xdebug 2.6.1. non thread safe xdebug.dll
BUT I can find NO other instance of php.exe on the PC - where in VS code is it looking for c:\php\ext\ a folder which doesnt exist - I cant find in VS code where such settings exist or how to tell VS code to look in right folder (in this case c:\xampp\php\ext)

FWIW Im using RobertLu's php debug extension though Ive tried all others available. On previous laptop some time ago I did have some success using Felix Beckers php debug externsion but that is no longer appearing in VSCode list of available extensions

Any comments or suggestions gratefully received



Подробнее здесь: https://stackoverflow.com/questions/792 ... reakpoints
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Php»