Debugging a script pulled in iframe from another script

There are two single-file "websites", both on my local computer with Apache:

First is in file i:\xampp\htdocs\temporary\outer\index.php containing:
print 'start: <br/>';
print '<iframe src="http://dev.inner/index.php"></iframe>';

Second is in file i:\xampp\htdocs\temporary\inner\index.php containing:
print "Hello<br/>";
print "World";

That's the whole project. The breakpoints are set in both files.

These "websites" are on separate domains: dev.inner and dev.outer (important!). On a local computer this is achieved by defining two virtual hosts, each pointing to appropriate root. As a result, when typing in the browser address http://dev.outer, then everything is displayed as it should (with iframe), and also the other address http://dev.inner works as it should.

The debugger doesn't stop on breakpoints in inner/index.php, when its content is pulled in iframe, by navigating to http://dev.outer in web browser.

Whatever configuration I try, the debugger always stops only in outer/index.php and never in inner/index.php, except in one case: when the address http://dev.inner is typed directly to the browser. Then of course, the debugger stops in inner (or displays the Incoming Connection from XDebug dialog, depending how the debugger was initiated, zero or normal). I use Chrome with XDebug helper plugin turned on and in PHPStorm I have the "Listen for remote PHP" handle green and turned on.

Is debugger supposed to stop on breakpoint in script which is pulled in iframe and is on different domain than the host script? If yes then how to configure it?

Comment actions Permalink

Could you please describe how you've set up forwarding to http://dev.outer & .inner?

Comment actions Permalink

You mean how I set up the domains on the local computer? There are two files:

1) c:\windows\system32\drivers\etc\hosts
in this file I added two lines: dev.outer dev.inner

2) i:\xampp\apache\conf\extra\httpd-vhosts.conf
in this file, I added this:
<VirtualHost *:80>
    DocumentRoot "I:/xampp/htdocs/temporary/outer"
    ServerName dev.outer
    ServerPath "I:/xampp/htdocs/temporary/outer"
<VirtualHost *:80>
    DocumentRoot "I:/xampp/htdocs/temporary/inner"
    ServerName dev.inner
    ServerPath "I:/xampp/htdocs/temporary/inner"

Not sure if there is anything else needed, but I always update just those two files when adding new dev domains and it works.




Comment actions Permalink

Any news about it?

Comment actions Permalink


I've consulted with a developer: this can only be done based on Simultaneous debugging sessions. Please read more at:


Please sign in to leave a comment.