vs code phpcs only works sometimes - visual-studio-code

Sometimes I open a php file in VS Code and no linting occurs until I open the linting console from the bottom, switch over to the terminal pane where a dialog shows up that asks me if I trust the authors of this workspace. If I say yes then linting errors are shown until I close VS Code.
Other times, I open a php file in vs code, no linting errors show so I open the linting console from the bottom and switch over to the terminal pane but nothing happens.
There is no pattern that I can see as to when the linter will work and when it will do nothing. I have never encountered a problem like this. Does anyone know anything about this problem?

Related

(eval):1: parse error near `typeset' Shows in Terminal

I used to debug javascript in VS Code's Terminal.
Recently, I see (eval):1: parse error near "typeset" in my VS Code's Terminal and I cannot debug .js anymore. I googled for a solution but didn't see any.
Don't know for sure if this causes the problem: I wanted to open VS Code from Mac's Terminal, so that in VS Code, I Used Shell to install code in PATH. After that, I see (eval):1: parse error near "typeset" in both Mac's Terminal and VS Code's Terminal.
Please give a hand. Thanks
UPDATE: I have tried to uninstall the code command from PATH in VS Code, but this error message still show in Terminal.

Stop Visual Studio Code from opening files on exception

While debugging a Flutter app, Visual Studio Code opens up files where exceptions happen even if I uncheck breakpoints for "All Exceptions" and "Uncaught Exceptions" in the debug pane. I even removed all breakpoints. Is there a way to disable this?
I couldn't find anything in settings. It's super frustrating to be editing a file and all of a sudden another file pops up and now I'm inadvertently editing some Dart system library.
A few files I've seen opened by the editor are binding.dart, view.dart, clip.dart, and sha256.dart, off the top of my head.

How to show all (-Wall) warnings in VSCode

I am using Visual Studio Code with the C/C++ extension. IntelliSense shows some errors but definitely not all of them, I tried settings the following setting:
"C_Cpp.default.compilerArgs": ["${default}", "-Wall"]
But is has no effect. The only thing that's some improvement is adding a build task: when I run it the warnings and errors it generates are displayed inline in VSCode. This workaround is still suboptimal: I need to build to get the errors while I would like to get as soon as I finish typing them (like it already is the case for other errors both in VSCode and other editors I know).
How can I fix this issue ?

Make Visual Studio Code always show errors, even after closing the file that has errors?

Right now, in Visual Studio Code, errors shows up right in the file itself, in the "Problems" pane and in the file explorer, but only when the file is opened.
This is fine, but not ideal. As soon as I close the file, the error notification is gone... and probably, the site I'm committing my work too 😅
Is there any setting to make the folder always red or marked, if any file in it shows errors? Otherwise, is there a command like "Inspect directory for errors"?

How do I debug why eslint is not working correctly with vscode?

I'm using vscode and eslint is running but it's not finding errors in certain files that it finds in others in the same project.
Is there some way to debug this? Like an option for more verbose output that will show me where it's getting its configuration for each file while running inside vscode?
The easiest way I've found of diagnosing ESLint problems is opening the tray at the bottom of the screen, clicking the Output tab, and selecting the ESLint debug feed from the dropdown at the top right corner of the tray. This will report what problems ESLint encounters as it loads and tries to lint your code. You might have to open a file of the type you're trying to lint to see all the output problems.
You can also open this from the command palette by pressing Cntl + Shift + P and then typing ESLint: Show Output Panel.