Php – How to ignore certain files while debugging in PHPStorm

PHPphpstormxdebug

I have debugging working in PHPStorm with Xdebug and my local apache webserver. I'm also using CodeSniffer to check my code style. CodeSniffer (phpcs.bat) is a tool you can enable in PHPstorm that is actually an external PHP script that runs every 3-5 seconds. The annoying thing is, whenever I have debug enabled (Listen for connections), it tries to debug the phpcs script even though it is not a part of my project. What's even odder is that phpcs is run via the php command line, NOT the apache server of which Xdebug is a part.

Is there anyway to stop phpStorm from debugging this external, command-line script?

Best Answer

You can ignore a file in PhpStorm in:

Preferences > PHP > Debug > Step Filters

Add it with the + sign in the skipped files section and navigate to the folder containing the file.

phpStorm pref

Related Topic