phpxdebugphpcodesnifferphpstanphpmd

Xdebug triggered by Code Sniffer (PHPCS) in PHPStorm


I have both xdebug and PHP_CodeSniffer (PHPCS) working great on my installation of PHPStorm, but the one really annoying part is that the debugger now seems to be treating Code Sniffer errors as breakpoints and interrupts the code to let me know of style warnings while I'm trying to test out code. What can I do to prevent Code Sniffer from being caught by the remote debugger in PHPStorm?

PS: I'm running Apache, using virtual hosts to map certain URLs to folders on my computer, and code sniffer never triggered PHPStorm's remote debugger explicitly, while my site caused PHPStorm to ask me if I wanted to include it's virtual URL for debugging.

The problem also happens with Mess Detector (PHPMD) and PHPStan.


Solution

  • I had a similar problem and I solved it like this: - went to "Project settings" -> "PHP" -> "Debug" - under "XDebug" I unchecked the two "Force ..." options.

    enter image description here

    Hope it does the trick for you.