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.

2 comments
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:
http://test.dev/index.php#hello

How PhpStorm handles it:
http://test.dev/index.php#hello?XDEBUG_SESSION_START=11197

How PhpStorm should handle it:
http://test.dev/index.php?XDEBUG_SESSION_START=11197#hello

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

0
Comment actions Permalink

beamar,

Thanks for report!

0

Please sign in to leave a comment.