ikappas / vscode-phpcs

PHP CodeSniffer for Visual Studio Code
MIT License
128 stars 56 forks source link

Version exception being throwed w/o being catch on XDebug #126

Open odahcam opened 6 years ago

odahcam commented 6 years ago

Sorry, I really dunno whats really happening, but any help would be awesome, I already deactivated the extension to avoid this issue and I'll be glad if I can reactivate it.

https://github.com/squizlabs/PHP_CodeSniffer/issues/2037#issuecomment-414053593

fey commented 5 years ago

Same issue. phpcs work bad when i turn on Listen for xDebug. Other extention PHP Sniffer work fine. Снимок

muametgrooby commented 4 years ago

I am having the same, you'll probably need to configure xdebug to ignore those files, I'll reply here once i figure it out.

Edit: Solved it by configuring xdebug to ignore that file. your launch.json should look something like this, make sure you add the actual path where your codesniffer directory is.

{ "version": "0.2.0", "configurations": [ { "name": "Listen for XDebug", "type": "php", "request": "launch", "port": 9000, "ignore": [ "**/vendor/**/*.php", "/usr/share/php/PHP/CodeSniffer/**" ] }, { "name": "Launch currently open script", "type": "php", "request": "launch", "program": "${file}", "cwd": "${fileDirname}", "port": 9000, "ignore": [ "**/vendor/**/*.php", "/usr/share/php/PHP/CodeSniffer/**" ] } ] }