Can I save styles in the dev tools temporary? - google-chrome-devtools

When „dev-tooling“ around, usually thy mighty chrome browser will throw out the changes after e. g. a page reload. There are plugins to directly save them to a file, which can be nice but for experiments or small tests that's not always a great solution.
So my question is: Is it possible to just temporary save e. g. styles for the session while you have the dev-tools opened and make n reloads without loosing the dom manipulation?

You can persist your style changes using Workspaces instead of relying on plugins. In terms of temporary sessions, this doesn't seem to be possible. DevTools has a History tab for Local Modifications, allowing you to revert changes like Styles. However, when used in combination with Workspaces, it doesn't apply. The difference is that Local Modifications are stored in a memory stack structure, but when you configure a Workspace, it has a direct binding with the file itself.
Something you could try as a workaround is to have your text editor configured to not automatically reload changes it detects (a setting somewhere?). Have your CSS file opened in the background and avoid navigating to the text editor until you finished your session. When you do navigate to it, it may prompt you to reload changes. If you cancel that and then do a save, it should overwrite the changes that were previously made from within DevTools.

Related

How to temporarily disable "preventing dirty writes" feature in Visual Studio Code

In my project, I've used some build/linting tools so they can automate force change my code based on some convention code styles but when I was running those scripts, vs code showed an error message:
Failed to save "<file-name>": The content on disk is newer. Please compare your version with the one on disk.and continue to open the "Resolve to save conflict" tab.
It seems to be annoying and not convenient for me.
So can you tell me how to disable this feature of VScode for a temporarily time?
v1.42 is modifying this functionality including adding a setting so that the dirty file/save conflict notification can be disabled. See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_42.md#ignore-save-conflicts
Ignore save conflicts
VS Code has a built-in mechanism to show an error when you try to save
a dirty file that has been changed outside of VS Code or by another
program (for example Git):
The motivation is to inform you that saving will overwrite the
contents on disk even though the file was changed after the file
became dirty. Clicking the Compare button lets you review your change
along with the version on disk and either overwrite or revert the
file.
In cases where you know that the changes on disk can be overwritten,
there is now an Overwrite button directly on the notification. You can
also configure files.saveConflictResolution globally or per workspace or
file type to disable the notification altogether. The options are askUser (default) or overwriteFileOnDisk.

How to refresh content of opened files in VS Code?

I'm looking for a way to refresh the content of a file opened in editor after it was changed by other tool.
For instance I'm using angular command line which makes changes to files but VS Code doesn't refresh the content after that and I can't see any of that. What's worse when I try to save the file, VS Code by default tries to save the old content upon the newer (asks before of course, but still its not what I'm looking for).
I didn't find any keybindings for refresh the editor's content. Maybe there are any extensions?
Thank you.
It should reload itself automatically, but I had a machine that stopped auto-refreshing. I'd change the file externally (with vim or whatever), and the file I had in the editor wouldn't pop and refresh itself, which it used to do. It turned out to be a git-related extension. I disabled it, and autorefresh returned. If you haven't already, try it with extensions off.

Is there auto-syncing in netbeans for external changes

I know netbeans syncs the original files once I save, but if there is a file changed externally is there a way for netbeans to recognize this and either tell me to re-sync it or automatically resync it with the new changes?
Here's what makes this behavior possible:
NetBeans 6.9 contains a feature that automatically looks for external changes to keep informations about files up-to-date. We have some reports that it can slow down NetBeans mainly, when an open project has many folders. When NetBeans find out that files were externally changed, it re-scans the files to keep data up-to-date that are used with features like code completion, navigation etc. Unfortunately the notification and following re-scanning can take some time and during this time many mentioned features are waiting for the finishing of scanning. There is option Enable auto-scanning of sources that can switch off this behavior. The option you can find it in Options dialog, Miscellaneous category and Files tab.
The default behavior is that NetBeans also looks for external changes when the main window gets focus. This is can be during developing a web application very often when user switches between browser and IDE. The mentioned option also switch this off.
When you switch off option Enable auto-scanning of sources you can still keep the information up-to-date, just invoke Scan for External Changes action from Sources menu manually.
(Here's the original article by Petr Pisl)
I find it counterproductive to leave this setting on, as sometimes auto-loading external changes to a file opened in the UI without asking for permission first can ruin your day when you're forced to make small local changes that you don't want replicated in your repository. I'm sure other people can think of more reasons to advocate for "warn before loading external changes" behavior to be implemented in NB. That is one of the reasons why I like Eclipse better sometimes.

What does Ctrl-S specifically do in Chrome Dev tools Sources tab?

The local save feature of the Chrome Dev tools Sources tab is very powerful.
However, I can't completely tell what kind of changes actually hold.
What changes are actually activated?
Ctrl-S applies your changes into v8.
So the the dynamic page behavior will work differently according to the changed code.
The star symbol in the file title indicates that the recent changes in the file haven't been sent to v8.
You have to save the changed file to the place where the web server gets it if you want to see the changes after reloading the page. You could do that with help of context menu.

VS2005 - Automatically requesting checkout of form on open, with "View Designer"

I'm trying to integrate our Source Control(SourceAnywhere) with VS and are getting a lot of push back because of this one issue.
Almost every time we open some of our Windows forms using 'View Designer' it edits the file (* appears beside file name). Nothing has yet been changed, I've tried comparing the before and after files and they are exactly the same. If we have the solution bound it will check the file out, but even if its not bound it still 'edits' the file. When you try to check the file back in, it doesn't get a new version or anything.
I've done some searching and haven't been able to find any way to change this behavior.
This is a huge pain point for me as if someone already has the form checked out and someone else tries to open it, they just get told that it can't be checked out, and the form won't open. Or, someone who has no intention to edit the form, will now have the form checked out but hasn't made any changes.
Thoughts?
This usually happens when there are controls within the form that have "Dock" set. If the IDE feels it needs to resize the form, then those controls will also be resized, and all of that information needs to get re-written to the source file. In the case where you're editing a form named "Form1" this source file is not Form1.cs, but rather Form1.Designer.cs - try comparing that file with the version from source control.
Alternatively, move to a source control system that doesn't use locking by default (for example, Subversion) or disable that feature in SourceAnywhere. This will require users to manage merge conflicts, but allows multiple users to work on a single file at the same time.