mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Debugging PHP

anoopd opened this issue · comments

commented

Debug adapter definition and debug configuration

dap.adapters.php = {
type = 'executable',
command = 'node',
args = { os.getenv('HOME') .. '/vscode-php-debug/out/phpDebug.js' }
}

dap.configurations.php = {
{
type = 'php',
request = 'launch',
name = 'Listen for xdebug',
port = '9003',
log = true,
-- serverSourceRoot = 'localhost:8888',
-- localSourceRoot = '~/Sites/',
},
}

Debug adapter version

No response

Steps to Reproduce

I am trying to debug a wordpress installation from docker (wp-env) which loads at localhost:8888 . It is showing Session active, but not stopped at breakpoint with options 1 to 6 .

Can somebody help with what i am doing wrong ?

Expected Result

Show debugger with details

Actual Result

Debugger not working as expected .

In order to help you you'd need to properly fill out the issue template. It's not just for decoration.

https://zignar.net/2021/12/03/help-people-help-you-and-put-in-some-effort/

It also looks as if you're already getting help on reddit (https://teddit.net/r/neovim/comments/uxxndn/nvimdap_and_php/), so I'm closing this here.

commented

Ok i have been able to sort it out by adding localSourceRoot . Sorry for not filling up the issue template correctly .