I use Devilbox to set up my development environment. Below is how I setup xdebug and debug PHP application in vim
Create configuration file, in host machine type these commands
cd [path_to_devilbox]/devilbox/cfg/php-ini-7.4
cp devilbox-php.ini-xdebug xdebug.ini
In xdebug.ini