This Question is Answered

2 "helpful" answers available (2 pts)
17 Replies Last post: Feb 17, 2013 3:47 PM by Danial RKH  
Danial RKH Newbie 37 posts since
Feb 14, 2013
Currently Being Moderated

Feb 15, 2013 12:20 AM

phpStrom debug any page except the page inside Project dir

hi

 

my Os is:

linux mint14 - 64bit (Fork of Ubunut)

 

$ java -version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

 

phpStorm version 5.0.4

PHP Version 5.4.6-1ubuntu1.1

 

my Xdebug config show in phpinfo():

 

and in php.ini config i have this:

[xdebug]
zend_extension=/usr/lib/php5/20100525/xdebug.so
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM

 

my phpStorm Config is:

http://www.axgig.com/images/51850672789497374848.jpg

and server config is:

http://www.axgig.com/images/84601211724820715544.jpg

now i press on debug and it's wating for xdebug:

http://www.axgig.com/images/66224320186264092777.jpg

i click on start xdebug bookmark and refresh the page:

http://www.axgig.com/images/31440969842925198277.jpg

but nothing happend and i see the Wating for .... message

 

but when i open anther link (pay attention here is untitled not untitled1):

http://www.axgig.com/images/41807859559577020901.jpg

this page automatically open in phpStorm and debug run:

http://www.axgig.com/images/08264448298763084394.jpg

see the message (this page is outside project)

thats very fantastic it debug all pages except the page i defined it for debug

 

any solutions ?

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 15, 2013 3:29 AM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

Do you have any symbolic links there? Xdebug will send final (resolved/real) path and not symbolic link.

 

 

P.S.

Not 100% related .. just some notes:

xdebug.remote_autostart=On

With this you don't really need any bookmarklet/browser extension/etc to start debug session as xdebug should attempt to connect to debug client on every single request (you may notice about 1 sec delay for page to be processed).

 

Same with Run/Debug configuration (PHP Remote Debug) -- you can just use that "Start Listening for PHP debug connection" button (the one with phone handle icon) to start debug client .. and then just initiate debug session from browser (or it should be initiated automatically with that autostart option On).

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 9:36 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

Hi there,

 

xdebug version? I suggest using latest stable which is 2.2.1.

 

My suggestion:

  1. Delete your "Run/Debug Configuration" as well as "Server config" (Settings | PHP | Servers) -- those on screens #1 and #2 in original post.
  2. Activate "Run | Start Listen PHP Debug Connections" (or the icon with phone handle on main toolbar).
  3. Make sure that "Ignore external connection ..." option is unchecked!
  4. Go to browser and navigate to the page you want to debug
  5. If necessary, activate debug session via Bookmarklet or browser extension and reload the page.
  6. PhpStorm should intercept incomming debug request -- it should show you the pop up window -- some think like below. Make sure to select correct path (since server is on the same computer, the paths should be identical). Maybe, the one you have created somehow differers from what PhpStorm is detecting (web server/php config??)

 

screen01.png

If it does not work ... please attach here your whole test project after all these manipulations (including .idea subfolder -- holds project configuration). I can try it here on my Windows 7 / IIS 7.5 / PHP 5.4.11 x32 nts via FastCGI

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 11:08 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

I've no idea why it does not work for you based on your screenshots only. Therefore:

1) Please try v6 EAP build -- http://confluence.jetbrains.net/display/WI/Web+IDE+EAP

2) Actually please attach your test project (must include .idea subfolder)

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 9:44 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

Also -- this screenshot of yours

http://www.axgig.com/images/08264448298763084394.jpg

I do see 2 index.php files opened -- one tab has normal backgound while another has yellowish background color.

 

Can you please show the full path for each of those files -- use "Navigate | File Path" on each of them (post 2 screenshots here).

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 9:52 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

BTW -- I do not see any breakpoints set on your very first screenshort.

 

I'm thinking -- xdebug may connect to PhpStorm just fine .. but since there is no breakpoints .. it will just run as normal. But .. for external (outside o fproject) script, it forces to break on first line (as shown on your latest screenshot).

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 11:30 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

You do not need (1), (2) and (3) all at the same time -- (3) on it's own is enough -- http://confluence.jetbrains.com/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 11:28 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

Both projects are working (debugging) just fine here on my computer -- no modification to project settings at all.

 

Where do you put breakpoint(s)?

 

Breakpoint got triggered on for line .. but does not trigger on echo line (for whatever reason).

 

screen01.png

The only other thing I may suggest (considering that you do everything else properly) is to try v6 EAP build.

Andriy Bazanov Master 2,752 posts since
May 28, 2010
Currently Being Moderated
Feb 16, 2013 11:49 PM in response to: Danial RKH
Re: phpStrom debug any page except the page inside Project dir

Does debug works in CLI mode ("PHP Script" type of Run/Debug Configuration) ?

More Like This

  • Retrieving data ...