Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension stops fixing on save

See original GitHub issue

Every now and then, vscode stops executing the php-cs-fixer on save. After a restart of vscode, it works again. When I manually run the command from the command palette (“Format Document”) when the on-save does not work, the manual command sometimes works, but not always.


I’ve checked other issues on this repo but none of the provided solutions fix my problem.

Relevant settings in config.json:

    "php-cs-fixer.onsave": true,
    "php-cs-fixer.executablePath": "/Users/george/.composer/vendor/bin/php-cs-fixer",
    "php-cs-fixer.lastDownload": 1557398149117,
    "eslint.autoFixOnSave": true,
    "eslint.packageManager": "yarn",
    "": "onSave",
    "php-cs-fixer.allowRisky": true,
    "[php]": {
        "editor.defaultFormatter": "junstyle.php-cs-fixer"

When I do a manual “Format Document” I get an error in the UI: Command 'Format Document' resulted in an error..

The console also shows an error: image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

wsand02commented, Feb 4, 2020

This worked for me

"[php]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "junstyle.php-cs-fixer"
10bocommented, Oct 30, 2019

Is there any update on this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint in VSCode not fixing on save - Stack Overflow
Install ESLint extension from the VSCode marketplace. ... This command would enable eslint to fix the file on save.
Read more >
Save doesn't save - Visual Studio Feedback
It would not save my file, and there were no outside locks on it. Saving a file is literally the prime directive of...
Read more >
Fix problems with apps, extensions, or themes - Chrome Web ...
At the top right, click Settings and then My Extensions & Apps. Click the app, extension, or theme. In the box that appears,...
Read more >
How to fix preferences that won't save | Firefox Help
Refresh Firefox to fix the problem. The easiest way to solve this problem is to restore Firefox to its default state while saving...
Read more >
How to fix Chrome for Windows not saving passwords on ...
Fix 8: Disable Problematic Chrome Extensions · Open your Google Chrome browser and go to the menu. · Click on More tools and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found