How do I debug why eslint is not working correctly with vscode? - visual-studio-code

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.

Related

need help in VSCODE debug

I'm a VSCODE first-time user. I tried to run debug on a simple python file and was not successful. I got 2 strange results:
the debug tool bar showed and disappeared instantly
no local variables was shown in VARIABLE section
Please see the screenshot.
Anyone could give me a hint anything was missing in what I did?
You need the python vscode extension to debug a python file. When you press F5 to start debugging, a menu will ask you what you are trying to debug. Click on Python File. The python extension creates a launch.json file for you and starts the debugger.
I noticed the Run and Debug tab is in your screenshot. Click that tab above where the variables would be shown and it should ask you to create the launch.json file in order to debug the file.
Read more on debugging and launch configurations for python here: https://code.visualstudio.com/docs/python/debugging

vs code phpcs only works sometimes

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?

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 ?

How to replicate the following Spyder behavior in VSCode?

I'm new to coding Python in VSCode. Previously I used Spyder but decided to move to VSCode as the project management seems better in it (I could easily switch to other files/folders by clicking on the path, just like in PyCharm). But I really need this one workflow which I still have not managed to do it in VSCode.
write some codes like Selenium.
Click run (F5)
The selenium browser opens up.
I could use the Ipython terminal to access the code interactively (find the element in the browser etc) and send new command.
I would like to have this workflow in VSCode. Im also quite overwhelmed by the difference in these 2 IDEs, for example, in VSCode, you have integrated terminal, a debugging console and an output tab, while im used to have only one-for-all Ipython tab.
Ok, I figured out what I need. Basically I just need to right click on the python file that I want to run on the side bar. Then I have to select 'run current file in interactive window'. The only difference is on the Ipython console, I have to use shift+Enter to send my input instead of just clicking enter. But its not a big deal.

Using CFLint in VS Code - can't seem to enable it?

I have a java 8 installed, and .jar file is where it's supposed to be, yet in my vscode settings file the lines to enable cflint appear to be dimmed out?
The hover error is "Unknown Configuration Setting". Any tips on getting CFLint enabled?