I am a new WebStorm user, and am wondering how to revert some code changes I made today.
I made some change which disrupted everything, and now I don't know how to see the code before this change (because WebStorm automatically saves changes). Undo doesn't go back far enough. Is there some way to recover a previous version?
Thanks
You should always use a version control system (VCS), for instance Git.
However, WebStorm (and IntelliJ and other JetBrains products) have a built-in VCS. If you are lucky, your old code is still there. Select VCS -> Local History -> Show history from the main menu while you have the file open.
This should open a window showing several previous versions of the file.
Related
When we debug an MVC5 application, links are provided to access the running scripts as shown below. This is for a basic MVC5 application that has had absolutely no modifications:
If we simply refresh the screen 3 times on the home page, the list displayed gets longer as shown below:
I've never really tried to debug a script yet. I have used the html links to view pages and I understand I can open one of the .js files, set a breakpoint and try to debug a script. But why are there so many links?. I would have thought I only need a single link for any given script or page that is in progress; that the links would go away when the script or page is no longer active. Clearly I'm missing something about the constantly growing list.
Could someone provide a brief explanation of this feature and how I will use it. My book on Visual Studio mentions this feature, but doesn't provide enough text for me to get a handle on this aspect of the feature.
This looks like a bug in the Edge debug adapter. Specifically, the adapter is supposed to send an event when the page refreshes (or a navigation occurs) to clear out old scripts that are no longer valid for the new execution context (here's a link to the event description in the debug adapter protocol if you're curious).
We've opened an issue on the GitHub project where you can track the progress of the fix.
For a workaround in the mean time, if you click on the bottom-most duplicate script in the list, that should be the latest loaded version, and should work without error.
*EDIT:
We've got a fix for the issue which should be out with 16.2 Preview 2 of Visual Studio.
I deleted part of my code, and accidentally saved.
I tried looking at my history and my source explorer, but those were both greyed out.
Help?
Thanks
I'm not sure if you can pull your deleted code out of the void, but you should look into version control software, like Git, to keep a lock on each version of your programs. I know it doesn't solve your problem now, but it will help a ton in the future if you make changes often!
Go to "Edit" → "Undo" to undo recent changes.
Or, go into your version control system's log and revert to an older committed version.
Or, restore from one of your off-site backups.
The most important was already said. However, here some relevant complements:
The Edit -> Undo (or Ctrl+Z) has to be done file by file if you have several files in your project.
The Undo works after a Save, provided that you've set the focus in the editor's window (and not the solution explorer's). However, once you've left Visual Studio, it's lost forever!
The AutoRecover setting in the Environment section of the Option dialog box ensures that a copy of your unsaved work is saved every couple of minutes and keep it a couple of days (in your document folder under Visual Studio 20xx\Backup Files...). Unfortunately, it is designed to protect you against a crash; so the files are removed when you save, and it won't help you (I mention it only in case you were aware of the backup files and hoped to get a solution with it).
If you're working with windows 10 and have activated the file history backup you may luckily look at older versions in the explorer. This will not help if you have done changes and deleted them without a backup in-between (e.g within one hour at least).
You may not like this suggestion because the VS IDE is very comfortable, once you're used to it. But some programming editors allow you to set the configuration to make a backup of the files before you save them (e.g. such as for example emacs or atom). The purpose is exactly to prevent the kind of problems that you've just mentioned.
The best approach to avoid loosing previous work is of course the source code version control, with the corresponding discipline. It's easy to setup: a right-click on your solution in the solution explorer to activate this feature on your project, then at each significant change, again a right-click on the solution to commit the changes. With git, you don't even need to create a central repository if you're working alone on smaller projects. The local repository is sufficient to archive the successive versions of your code and find them back. But again, it's no magic: if you've made a lot of changes and didn't commit them, it won't retrieve them...
I've replaced my old dev laptop with a new one, and my Siebel 7.8 Tools aren't enjoying the change: the applet web layout editor gets frozen when I try to scroll.
The applet loads fine, I can add controls, move them around or remove them... but if I try to scroll, it only does so for a moment and then it gets frozen: everything inside the web layout pane (including the scrollbars) stops responding. I've also noticed a visual glitch when it happens - half of the "InfoButton" placeholder and half of the "Elemento" field are duplicated:
The rest of the Siebel Tools keep working however, I can just close the layout editor and open a new one, which will work without problem... until I try to scroll again.
It happens also if I try to show a bigger applet area without using the scrollbar (for example, if I hide the object explorer with Ctrl+E to have more room), or if I click on Preview. Only in that case, instead of a glitched layout, it shows all blank (and freezes).
It doesn't matter if it's a list applet or a form one; whether I'm connected to my local DBF database or to the server repository; if I run the Siebel Tools with or without administrative privileges...
To make things even weirder, the first time I edited an applet web layout in the new computer, it worked fine (a lot of scrolling included). The issue started with the second applet I tried to edit (but now it happens with the good applet too).
The new computer is running Windows 7 (64bits) with IE8. The old computer had exactly the same, only the 32bits version. Siebel Tools have been properly installed (I didn't just transfer my old folder to the new PC). And I've checked the tools.cfg file, specifically the WebClientSiteDir property, which points to the right folder, C:\Siebel_7.8\Tools\PUBLIC\ENU.
Any ideas, other than reinstall the Tools? Has it happened to anyone before?
Solved! I tried a lot of different things, including a full reinstall of Siebel Tools. In the end, it was much easier to fix: I just needed to enable the option "Run this program in Windows XP compatibility mode", in the Tools shortcut.
I'd swear I didn't have it enabled in my previous computer and it worked just fine, but anyway... that fixed the issue for me.
In Android Studio 0.2.0, whenever I type anything in my build.gradle files, Gradle decides it's time to rebuild. This takes a long time, generates noise and kills my battery life. It never ends as well, at least not until I finish editing the file… always rebuilding as I type. Lucky me I use Ubuntu with plenty of free memory.
So… I'd like to deactivate any option to auto make stuff. This is what I've tried so far:
Checking "File" | "Power Save Mode" in the menu.
Unchecking all options and all combinations between them in "Compiler" options, especially "Make Project Automatically".
Nothing works. I'd like a way to only build when I ask. Like a manual mode with a button. Something like that.
I understand Android Studio and the whole build system is very new, with lots of rough edges, but I'm hoping it's just a matter of an obscure flag definition in a file somewhere.
Previous research: this question does not provide enough details or goals, so I made my own. This G+ thread was a dead end as well. I'm still getting used to the new stuff and may be lost searching (i.e., missing the right keywords etc.), so sorry in advance if there are no updates on this issue.
Thank you.
under preferences > Gradle you can disable auto-import. With it selected it'll reimport the gradle project (which right now builds it first) every time you change the file.
Additionally, if you are using Kotlin build script (Kotlin DSL), after disabled auto-import like #Xavier said, you need one more step: uncheck the Auto Reload checkbox of KotlinBuildScript under preference -> languages & frameworks -> Kotlin -> Kotlin Scripting.
I'm new to JetBrains WebStorm IDE. I really like it, especially for my JavaScript development, but I can't find how to set a very simple preference. I use the Project and Structure toolbars constantly, but every time one of the toolbars loses focus, the toolbar hides. Is there any way to lock the toolbars to keep them from hiding so that they are always visible? It seems like something very obvious, but perhaps not... I have gone through every setting in preferences that I can see but haven't found anything that works.
Any help would be greatly appreciated.
Enable the Pinned Mode:
If you also enable Split Mode, you can have both Project and Structure visible at the same time on the same side.