Vscode-php-debug: pathMapping example on VSCode Marketplace still not correct

Created on 27 Jan 2018  路  4Comments  路  Source: xdebug/vscode-php-debug

I just spent an hour or so trying to set up VSCode and Xdebug (in combination with DrupalVM). Being relatively new to VSCode, I don't have lots of experience yet in configuration files. But at work I am used to working with PHPStorm, so I do have experience in using XDebug and setting that up. I copied the example code (from the VSCode Marketplace) and couldn't get it to work, when suddenly I saw the $ prefixed in another configuration example. That led me to this repo, and eventually I noticed the (probably) highly related issue #207 .

Tl;DR:

pathMapping example code on marketplace.visualstudio.com (and thus also in the VSCode Extension Info page) lacks an $ before {workspaceRoot}, which was already fixed on Github by #207.

User @ooystein noticed this as well: https://github.com/felixfbecker/vscode-php-debug/pull/207#issuecomment-358629097

Screenshot of code on github:

schermafbeelding 2018-01-27 om 00 05 43

Screenshot on marketplace:

schermafbeelding 2018-01-27 om 00 05 30

Most helpful comment

Maybe you could add an example for Windows directories to the documentation as well. It took me an hour to figure out that the drive letter has to be written in lowercase and that slashes have to be written as / and not as \\...

This works for me:

"/var/www/html": "c:/Users/Example/FooBar"

All 4 comments

I came here to mention the same thing...

Same here, this took me way to long to figure out (ashamed to say). But it needs to be fixed, such a small step for a man, giant leap for....the rest trying to figure this out.

Maybe you could add an example for Windows directories to the documentation as well. It took me an hour to figure out that the drive letter has to be written in lowercase and that slashes have to be written as / and not as \\...

This works for me:

"/var/www/html": "c:/Users/Example/FooBar"

Update should now reflect that ${workspaceRoot} is deprecated in favour of ${workspaceFolder}.

Also should have an usage example when in multiroot environment with may be a link to VSCode Variable Reference.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrews05 picture andrews05  路  10Comments

NerijusNoreika picture NerijusNoreika  路  12Comments

johnbillion picture johnbillion  路  11Comments

jmo161 picture jmo161  路  4Comments

herbertpimentel picture herbertpimentel  路  6Comments