Mawg
Mawg

Reputation: 40185

PhpStorm debug HTTP request not hitting breakpoint

I am fairly certain that I have PhpStorm configured correctly for debugging. When I create a run configuration as "PHP Script", the debugger functions as expected.

Now, I want to debug an "HTTP request" as described in the official documentation, because I want to pass some $_GET parameters - note, this is an AJAX request from the browser.

However, despite following it, the debugger hits no breakpoints; not even on the first code line - even when I set the "stop on first line" option.

enter image description here

When I click the URL indicated by the red arrow, it is launched in the browser (without the parameters), so the path looks ok. I see no PHP errors or warnings in the IDE, nor when I launch teh page int he browser.

vlocalhost` is running just fine.

Any idea what I am doing wrongly?


[Update] With thanks to @LazyOne for that comment.

File/Settings ... Languages & Frameworks/PHP/Debug, point 1), click the "validate" link.

The path shown was the path to the script, which is not the root of localhost. Changing it to the root of localhost validated and is valid - but I still don't hit any breakpoints :-(

enter image description here

Upvotes: 0

Views: 981

Answers (2)

John Miller
John Miller

Reputation: 727

This might help some using Windows.

Go to File > Settings > PHP > Servers and uncheck 'use path mappings...'

Upvotes: 1

Mawg
Mawg

Reputation: 40185

With thanks to @LazyOne for that comment.

File/Settings ... Languages & Frameworks/PHP/Debug, point 2), seems to have fixed it, installing the browser plugin from https://www.jetbrains.com/help/phpstorm/browser-debugging-extensions.html and activating it (point 3 might also have helped; try it if point 2 isn't enough for you)

enter image description here

Upvotes: 0

Related Questions