Page 1 of 1

How to debug page with htaccess mod rewrite?

PostPosted: October 27th, 2018, 8:46 am
by perry
Hi,

I can run debugger directly for a certain page by hitting green "play" button in Visual Studio. However, this will debug only a certain page with no query string. If I try to modify URL by adding string in a browser and reload page, connection to debugger is lost.

For example:

localhost:9000/?XDEBUG_SESSION_START=9B3EE103

but if I rewrite it manually to

localhost:9000/some-article-id?XDEBUG_SESSION_START=9B3EE103

debugger no longer works. However, in Visual Studio, debugger is still running, but not catching breakpoints that are included in newly used data.

Re: How to debug page with htaccess mod rewrite?

PostPosted: November 5th, 2018, 3:27 pm
by Miloslav Beno
Hi,

What you can try is to alter php.ini by adding:

Code: Select all
xdebug.remote_autostart = 1


This will instruct the debugger to try to iniate the connection during each request. That should solve the issue.

Please let me know if that helped.

Thanks

Re: How to debug page with htaccess mod rewrite?

PostPosted: November 19th, 2018, 9:50 pm
by mhpcc
Other than using auto connect, you don't have to append the ?xdebug session parameter every time unless you use a browser without cookies. You can even use https://addons.mozilla.org/en-US/firefo ... r-firefox/ to just set in your browser when you want to debug and when not. Setting it to on will create the xdebug cookie, setting it off will remove it.