How to debug page with htaccess mod rewrite?

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

How to debug page with htaccess mod rewrite?

Postby perry » October 27th, 2018, 8:46 am

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.
perry
 
Posts: 3
Joined: April 2nd, 2018, 5:00 pm

Re: How to debug page with htaccess mod rewrite?

Postby Miloslav Beno » November 5th, 2018, 3:27 pm

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
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: How to debug page with htaccess mod rewrite?

Postby mhpcc » November 19th, 2018, 9:50 pm

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.
mhpcc
 
Posts: 22
Joined: October 19th, 2018, 10:46 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 25 guests

cron

User Control Panel

Login

Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 25 guests