# Issue with xDebug on remote server and pathmappings in Visual Studio Code

**URL:** https://discourse.roots.io/t/issue-with-xdebug-on-remote-server-and-pathmappings-in-visual-studio-code/26003
**Category:** trellis
**Tags:** deploys, ansible, trellis
**Created:** 2023-09-22T03:37:37Z
**Posts:** 1

## Post 1 by @claudiouey — 2023-09-22T03:37:37Z

I am trying to debug a remote development server using xdebug on Visual Studio Code. I am able to connect, but the problem is that the code executes through the `releases` folder which makes it an issue for the pathMappings, since it is a dynamic structure.  
My (and what I have seen other’s configuration) is:  
{  
“version”: “0.2.0”,  
“configurations”: [  
{  
“name”: “Listen for XDebug”,  
“type”: “php”,  
“request”: “launch”,  
“port”: 9003,  
“stopOnEntry”: true,  
“pathMappings”: {  
“/srv/www/my\_site/current/web”: “${workspaceFolder}/site/web”,  
}  
}  
]  
}

But the actual code that is executed is something like:  
“/srv/www/my\_site/releases/313412341/web”:  
Which obviously is problematic when trying to map. Is there any way around this?
