Cant't run Xdebug

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

Cant't run Xdebug

Postby PapyRef » February 20th, 2013, 10:50 am

I can't debug my php source. I use Wamp with PHP 5.4.3.

XDebug extension is correctly installed (http://xdebug.org/wizard.php)
Summary
Xdebug installed: 2.2.0
Server API: Apache 2.0 Handler
Windows: yes - Compiler: MS VC9 - Architecture: x64
Zend Server: no
PHP Version: 5.4.3
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: D:\wamp2\bin\apache\apache2.2.21\bin\php.ini
Extensions directory: D:\wamp2\bin\php\php5.4.3\ext

In VS 2010, I check Use PHP built-in Web Server & Auto-assign port.
When I want to debug my php file (F5),
- I have a Warning message Box with "PHP Startup:"
- In Firefox (http://localhost:28570/index.php?XDEBUG_SESSION_START=1) I got
The connection failed
Firefox can not establish a connection to the server at localhost: 28570.


PHP Tools Debugger has been started, and waits for XDebug enabled eb request ...
Server: Custom Web Server
Server URL: http://localhost:28570/

Can you help me ?

Rem : Excuse me for my poor english, I'm french
Seo Black Inside Dév. Script SEO & Outil référencement
PapyRef
 
Posts: 4
Joined: February 20th, 2013, 10:32 am

Re: Cant't run Xdebug

Postby Miloslav Beno » February 20th, 2013, 11:59 am

Hello,

Could you please write me what warning message is shown to you when you press F5 (or make screenshot)?

Anyway what I would do is to change project settings to use WAMP as an server, not PHP 5.4 bultin server.

So just to check Use Custom server in project settings and fill URL which is set by WAMP for your page. Then it should debug correctly provinding WAMP set XDebug correctly.

Give 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: Cant't run Xdebug

Postby PapyRef » February 20th, 2013, 12:34 pm

Here screenshot
- http://i.minus.com/iYhG9677ya4D6.png
- http://i.minus.com/i9JFoY6KX9c2g.png

If I check Use Custom server in my project settings and fill URL with http://localhost/WebSite1/PHPWebProject1/, It's run but don't stop on breakpoint.
Seo Black Inside Dév. Script SEO & Outil référencement
PapyRef
 
Posts: 4
Joined: February 20th, 2013, 10:32 am

Re: Cant't run Xdebug

Postby Miloslav Beno » February 20th, 2013, 1:00 pm

Thanks for screenshots.

If it doesn't stop on breakpoint there will be something with the XDebug configuration. If you run simple script:
Code: Select all
<?php phpinfo();


Do you see XDebug in the outpit? (it should look like this http://docs.devsense.com/index.php?action=remote&title=-&mod=SecureFileStore&rf=getFile&f=/e/ed/Xdebug_info_section.png ) If it's there, is it properly setup?

Code: Select all
zend_extension = "C:\Program Files (x86)\php-5.4.8\ext\php_xdebug-2.2.1-5.4-vc9-nts.dll"
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_mode = req
xdebug.idekey="php-vs"


XDebug path is from my system so your will be different and idekey isn't required.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Cant't run Xdebug

Postby PapyRef » February 20th, 2013, 1:22 pm

Yep ! Thank's a lot. It's OK.

I forgot to copy XDebug DLL in zend_ext directory.

A small note: You must execute VS 2010 with administrator rights.
Seo Black Inside Dév. Script SEO & Outil référencement
PapyRef
 
Posts: 4
Joined: February 20th, 2013, 10:32 am

Re: Cant't run Xdebug

Postby Miloslav Beno » February 20th, 2013, 2:04 pm

Great! Glad it works. Yes with the use of custom server it needs Admin rights in the current release.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Cant't run Xdebug

Postby PapyRef » February 20th, 2013, 3:03 pm

Yes very Great !!
But it's a shame that Debug feature is not in the Basic version.

I am a student and 79$ is a bit expensive for the Professional version. :roll:
Seo Black Inside Dév. Script SEO & Outil référencement
PapyRef
 
Posts: 4
Joined: February 20th, 2013, 10:32 am


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 49 guests

cron

User Control Panel

Login

Who is online

In total there are 49 users online :: 0 registered, 0 hidden and 49 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 49 guests