Click here to Skip to main content
15,312,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have an application I made to keeptrack of my worked hours when working for customers.

I did it without debugging and it works very well, but a few times it shows some exceptions that I want to solve.

I've installed the PHP Debug extension in the Visual Studio Code and enabled the XDebug in my NAS (where the webserver resides).

After checking it works I've tried to set the path mappings to be able to debug on a remote server while editing the files stored there too.

In my NAS I have my files in the path \\MyNas\web\TimeApp
VSCode is editing those same files.

Without setting pathMappings I get the message "Unable to open 'xxxx.php': Ubale to read file '\volume1\web\TimeApp\xxxx.php' (Error: Unable to resolve non existing file ..."

If I add \volume1\web\TimeApp in my C: root folder, it starts working, but then I have to update the files at my local path and into my remote/server path.

Is there any way to be able to debug on a remote path?

I've also tried to write in the pathMappings:

"pathMappings": {
        "/" : "\\MyNas\web\TimeApp/"
      }


But then it seems the debugger tries to find my files in c:\MyNas\web\TimeTracker which of course is not what I want.

Is it possible to debug using the same files the server uses when those files are remote?

Thanks all!

What I have tried:

finding examples in the Internet, trying to define the pathMappings to get it working, but I've not been successful.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900