breakpoint not hit when using REST-clients

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

breakpoint not hit when using REST-clients

Postby hartmut stippich » October 10th, 2016, 2:10 pm

Breakpoints do not hit when launching a request by REST-Client, like postman.
I have installed VS2015 and latest phptools.1.20.9095.msi.
For test I have created a simple index.php having just one line: phpinfo(); On this, I have set a breakpoint. Internal php engine is used for execution.
When launching the request by web browser (http://localhost:46xxx/?XDEBUG_SESSION_START=92xxxxxx) the breakpoint is hit as expected and the html response is renedered as expected when continuing. When doing the same on postman, the response is the same, but breakpoint is NOT working.

what to do?
hartmut stippich
 
Posts: 2
Joined: October 10th, 2016, 1:47 pm

Re: breakpoint not hit when using REST-clients

Postby Miloslav Beno » October 10th, 2016, 2:25 pm

Hello,

Xdebug just doesn't know it should start to debug and connect VS. You can just add xdebug.remote_autostart = 1 to php.ini file. https://docs.devsense.com/debugging/troubleshooting#debugger-wont-work-when-dont-open-a-page-wait-for-a-request-from

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: breakpoint not hit when using REST-clients

Postby hartmut stippich » October 13th, 2016, 8:06 am

yes, this helped. thanks for reply
hartmut stippich
 
Posts: 2
Joined: October 10th, 2016, 1:47 pm

Re: breakpoint not hit when using REST-clients

Postby Miloslav Beno » October 14th, 2016, 1:27 pm

Perfect!

I'm glad I could help.

Have a great weekend,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 119 guests

cron

User Control Panel

Login

Who is online

In total there are 119 users online :: 0 registered, 0 hidden and 119 guests (based on users active over the past 5 minutes)
Most users ever online was 410 on April 25th, 2024, 12:19 am

Users browsing this forum: No registered users and 119 guests