Robert
Robert

Reputation: 596

PHPStorm Internal Web Server Breakpoints do not work

Whan can I do to get breakpoints working in PHPStorm / PHP internal web server?

My environment is:

OSX 10.9.4 PHPStorm 7.1 XAMPP 1.8.3-4 / PHP 5.5.11 with Xdebug v2.2.3

I have set a few options in /Applications/XAMPP/xamppfiles/etc/php.ini:

[xdebug]
zend_extension="/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
xdebug.remote_enable=On
xdebug.profiler_enable=On
xdebug.profiler_output_dir="/Applications/XAMPP/xamppfiles/temp/"
xdebug.remote_log=/Applications/XAMPP/xamppfiles/logs/xdebug.log

PHPStorm settings:

PHP Home: /Applications/XAMPP/bin The settings dialog tells me that I have PHP 5.5.11 and Xdebug 2.2.3 which is what I expected.

I use Chrome and have the Jetbrains IDE Support extension installed.

When I hit "Debug" the browser displays the output of the PHP script along with a messages "JetBrains IDE Support is debugging this tab"

Whenever I set a breakpoint the breakpoint is ignored altogether.

When I use the same PHP environment from Netbeans 8, breakpoints work.

Same problem on Windows 8.

Upvotes: 0

Views: 1823

Answers (1)

Robert
Robert

Reputation: 596

OK for anyone who might stumble across the same problem, btw thanks, @LazyOne:

Most IDEs (Eclipse, Visual Studio, Netbeans, Xcode, IntelliJ) debugging workflow goes like that:

  1. Set a breakpoint
  2. Hit "Debug" rather than "Run"
  3. App is suspended at the breakpoint

Some IDEs even do have only a "Debug" button, no "Run", which is fine and simple enough for me.

PHPStorm is different.

You can start the App using the "Debug" button, it will launch a browser or the app in console mode, the browser plugin will even tell you that it is in debugging mode - but - breapoints won't work until you

  1. tell the IDE to listen to XDEBUG
  2. tell the App that ypu want to go into debug mode

The details of the workflow are documented in many places, a good one is in the Jetbrains manual, so just read it thoroughly and enjoy.

Upvotes: 1

Related Questions