Dear sir or madam,

I'm trying to setup remote debugging but whatever I do the breakpoints are not triggered, but xdebug_break(); does (well sort of).

Environment:
Windows 10 is development machine (the settings are attached in the image)
VM with docker running the PHP code

If I set: "xdebug.start_with_request = yes" then the xdebug_break(); breaks on proper place and I can step debug,
but breakpoints are not working.

If I set: "xdebug.start_with_request = trigger" then the xdebug_break(); breaks but inside the next function call e.g.
for the call below I land inside toArray() function which is wrong.

public function inittv( Request $request )
{
    xdebug_break();
    $response = $this->initService->init($request->toArray()) ?? [];

Now when inspecting the xdebug log I see that 'PHP tools' are sending invalid paths to xdebug.

[14] [Step Debug] <- breakpoint_set -i 6-0 -s enabled -t line -f file://E:/Podjetja/Nevron/ContentWare/Design/VS-Backend/Backend/Source/app/Http/Controllers/Client/InitController.php -n 289
[14] [Step Debug] WARN: Breakpoint file name does not exist: E:/Podjetja/Nevron/ContentWare/Design/VS-Backend/Backend/Source/app/Http/Controllers/Client/InitController.php (No such file or directory).

I assume that XDebug should get:
[14] [Step Debug] <- breakpoint_set -i 6-0 -s enabled -t line -f file:///var/www/html/app/Http/Controllers/Client/InitController.php -n 289
request and not the windows path's one.

I assume this is a bug or maybe I have set something incorrectly.

Thank you for all the help.

Best regards
Waldemar

    Also take notice that I'm using mklink to create source folder on my machine which is linked to VM's source folder.

      Hello Waldemar,

      Thank you for the post.

      Could you try to change the left column of the path mapping to a relative path to the project root. In your case Source and let me know if that helped.

      Thank you

        Write a Reply...