mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.47k stars 194 forks source link

Debug PHP "blade.php" files #1058

Closed andresgutgon closed 11 months ago

andresgutgon commented 11 months ago

Problem Statement

Hi, I'm using this plugin for running debugging sessions in Nvim and is working great. Today I was trying with a PHP file and I saw this message in the vim prompt:

No configuration found for blade

Blade is templating language for PHP used in most frameworks. I'm using it with Laravel. The think is a somefile.blade.php file is kind of a PHP file and I was wandering if someone had a similar issue of wanting to do a debugging session in a blade file.

Thanks!

Possible Solutions

No idea. I didn't found any info about this. Maybe is impossible?

Considered Alternatives

The alternative is to move the PHP logic out of blade templates but the Laravel project + livewire components makes super appealing for me to have all in one components with logic in php and HTML template. Like a React component

mfussenegger commented 11 months ago

You probably have the filetype set to blade within blade.php files which is why nvim-dap is looking for configurations in dap.configurations.blade

I don't know if the php debug adapter could handle them. You can try setting something like:

dap.configurations.blade = dap.configurations.php

After your php configuration.

If it doesn't work, then it's not supported by vscode-php-debug.

The issue tracker here is for bugs/features relevant to the client, not for debug adapters and also not for general support so I'm closing this

andresgutgon commented 11 months ago

The issue tracker here is for bugs/features relevant to the client, not for debug adapters and also not for general support so I'm closing this

Fair. And thanks a lot for the help!