Why php breakpoints are not working for urls ending with hash # ?

When the "Start URL" is "http://example.local" all is fine. But when it is "http://example.local/#" then no breakpoints are working. Same for more complicated urls. My application sometimes produces such urls ending with # when normally walking the menus and when such url is copied/pasted from address bar as a Start URL in phpStorm, then no breakpoints are working.

I'd like to know, whether such address is incorrect for phpStorm for a reason, or is it a bug? For web browser, it's ok.

Comment actions Permalink

Hi there,

As I understand you are using "PHP Web Application" run configuration type? If so -- it's a bug in how PhpStorm handles such URLs -- it need to add some query parameter to initiate debug session and because you have # symbol (fragment identifier) it adds that query string at wrong position which results in xdebug session is not getting initiated (as that query string parameter is never get sent to the server -- fragment-identifier is not meant to be sent to the server by browser).

Example URL:

How PhpStorm handles it:

How PhpStorm should handle it:

In short -- it's a bug -- http://youtrack.jetbrains.com/issue/WI-10785

Comment actions Permalink


Thanks for report!


Please sign in to leave a comment.