0

I have multiple virtual hosts on Apache all pointing to my local machine but different folders:

http://local.demoA.com (pathA) http://local.demoB.com (pathB) http://local.demoC.com (pathC)

All paths are part of the same project folder structure in IntelliJ but I am having difficulty starting a debug session which hits a URL from demoA and within that the js side of the page calls demoB URL. Makes sense?

I have managed to setup IntelliJ to break on demoA above but will not for demoB.

On the other hand MacGDBp seems to support this (though wont work without setting it to break at first line of execution).

George
  • 1,224
  • 12
  • 21

1 Answers1

0

Turns out it was more simple than I was making it out to be.

What I did is enable the "Start listening to PHP Debug connections" (two icons after debug on the toolbar).

As soon as a connection comes through (assuming XDebug is configured to run) IntelliJ will automatically prompt you to attach and listen and it will also setup the needed server for you for the virtual host.

I still haven't found a way to break only on my breakpoints nor a way to start debugging demoB calls when starting a debug session for demoA host but at least I am getting typical XDebug behaviour of breaking on every entry line.

Update

Found this for first line breaking:

How to stop xdebug from stopping on first line with PhpStorm?

As such, simply start listening stop breaking on first line and set your breakpoints wherever you want and ready to go!

Community
  • 1
  • 1
George
  • 1,224
  • 12
  • 21