I have been writing some code in WebStorm for a practice project. But the problem is, I have written some code today and the application seems to work fine, then tomorrow when I am writing some more code and the application is catching a bug which I am not able to debug, then I have to start all over again, which is pretty painful.
I would therefore like to save the code while it is working so that if required I can revert back to the last working version. I believe this is called version control and most people use GitHub for this, is it ?
I couldn't find a similar question. Maybe I am not using the correct keywords while searching.
Related
(Currently using VS Code on macOS Monterey, mostly for React and JavaScript.)
When I used to import a component at the top of my file, Vs Code would suggest the path of the file. I would simply press enter or click on the suggestion and VS Code would fill in the rest. Seems to me like a standard feature of VS Code, and I've grown pretty accustomed to it.
Now, it doesn't suggest anything. I'll type out a file that exists in the project, and nothing appears. I've tried it with several projects, and none of them suggest anything anymore — when just last week it was working fine.
trying to import
One thing... I have a lingering suspicion that it's from doing this:
npm i #types/react -g
A friend recommended I add it. With it, you can declare a component in your project and VS Code will auto import it. Really, it's the only thing I can remember changing since this strange behavior with VS Code started, but I'm not positive. Just a suspicion. I've tried to remove it, but it didn't fix anything.
I've done a bunch of stuff found on stackoverflow already with no improvements:
adding to setting.json, like this, or this
even deleted VS Code w/ extensions
I've been using the ESM module with VSCode and my Mocha unit tests for a long time now, a couple of years at least. Recently when I launch an individual test file in VSCode and set a breakpoint in the test file, it no longer breaks in the original file, but rather breaks in the "ESM compiled" file. I don't really know how ESM works enough to talk about it very well, but the file is compiled/transpiled/transformed in some way with all the imports converted to non-ESModule code. I'm able to step through, and it continues to step through other files as well, but each new file opened is this newly "ESM compiled" version instead of the original file, like it used to be. I only just noticed this recently. So I decided to install and older version of VSCode and see if it still happened, and it turns out it doesn't. With version 1.45.x it works as usual, but with anything newer, I get all these "ESM compiled" files opening up when I step through code.
Does anyone know why this is happening? Is there any new setting I can set in the newer VSCode versions that would cause this to not happen? It's really more of an annoyance than anything. I can still get my work done, but it's not as streamlined as it used to be. I will probably end up just downgrading permanently until I can find a way to make it not occur in the new version.
So, if anyone has experienced this, or knows of something new in VSCode that would cause this, I'd really appreciate some help. Thanks.
I am working on a project in VSCode, developing a React front-end application. Everything was working fine but I decided to clean up my code by using ESLint + Prettier + the AirBnb eslint guide.
I got this installed and of course, many issues came up. I started working through them, but these are causing the app to not compile. Ultimately, these are all code clean up issues, but now I can't get the app to run, and as i Make changes, I want to ensure I'm not breaking something else.
Does anyone know how to turn-off ESlinting in this situation so it will allow the app to turn?
Ultimately, it would be great if the issues appeared as simple "warnings" instead of "errors"...
I tried updating the .eslintrc.json file to change things to warn status, but it's not working.
There must be a simple way/toggle to enable/disable this checking? Or as I metioned, just have these appear as warnings for me to clean up?
I am working on a c++ project using a version of eclipse (Atollic TRUE studio) and this morning my indexer was working just fine. Currently, almost everything is broken (some local things within a file still work, but the rest fails). Googling around told me to do a indexer->rebuild. I have done this is the passed as well and back then it worked just fine. I noticed that, during the indexer rebuild, some progress bar was shown. Now, if I execute the indexer rebuild, nothing happens and I don't see this progress bar anymore. I have not changed any project/workspace/indexer settings, at least not on purpose anyway.
Among others I found this post
Eclipse indexing not working
where BЈовић claims
If this doesn't work, then you are out of luck. c++ is very difficult language to parse.
Is this really the answer? Or is there some smart trick that I missed?
I am having a difficulty while attempting to debug some code in grails. It is difficult to put into text, so I have posted a screencast showing exactly what the problem is here. In short, while I am debugging the debugger starts jumping from place to place and not following the program logic I have in place. The only other similar question I have found is a year old, had no solution, and can be found here.
The best guess I have so far is that the debugger is displaying the text I have typed in, but is actually executing an older version of the class file which it has cached somewhere. Therefore, I tried:
cleaning the project
manually deleting all of the class files from the target folder and from the target-eclipse folder
Searching my entire hdd for additional files with similar names
removing my project from the workspace and re-adding it
closing and reopening the IDE
grails refresh-dependencies
Importing the project into a new IDE (I was using GGTS, I switched to IntelliJ)
None of those solutions had any effect. I realized that the issue was in a .groovy file, and I was writing almost pure Java, so I deleted the .groovy file, and re-created the class in a .java file. That solved my problem. Unfortunately I am having the problem again, and this time it is in a controller that heavily relies on the grails framework, so that solution is not an option. Other than also being in a .groovy file, another similarity is that the code breaks on an if statement.
My next steps:
Verify that the application is not executing the code I see by using print functions to monitor actual execution flow.
comment out the entire function and re-add functionality one line at a time to see if I can see what breaks it.
Delete the .groovy file, and re-create it as another .groovy file.
Any help is appreciated, and since I can't find any answers online I will continue to update this question as I learn more.
See my comment on the jira issue that you raised. You have found a problem with the groovy compiler and how it calculates line numbers. This is not a problem with executing the wrong class files or using a broken debugger. The debugger is doing exactly what it is expected to do. It is the compiler that is providing erroneous line number information.
The next step, as described in the issue, is to provide a simple project that recreates the bug. I tried to do so myself, but could not. So, please supply something that we can work with. Then we can notify the groovy compiler team.