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

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.

Related

How do I reload the page after making changes to JavaScript code on source panel of chrome dev tool

I was profiling bbc page and I noticed some jankiness. I got to the culprit JavaScript file and it had an observer on scroll. I made the changes. However when I reload the page all my changes are gone.
I could have used workspaces but since I do not have bbc code I can't use it.
My question is after making local changes to the file how do I tell chrome devtool to use this changed file and then reload the page so that I could do performance profiling again.
This feature is in development as a Local Overrides experiment. However, it is not yet stable (some testers reporting it simply crashes the browser) so using the experiment as it is now is not recommended. As it is, in Stable Chrome DevTools there is no functionality for this built in.

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.

Can I save styles in the dev tools temporary?

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.

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.

Mixed WaveMaker/Java project - how to do it?

WaveMaker is a RAD tool that generates Java and Javascript code - so:
Which files should be checked in to version control, and which files
should be ignored?
What happens if I want to customise the generated code? Will my customisations be silently overwritten?
Can customised code be round-tripped back into WaveMaker?
What about database changes made outside WaveMaker - can they be round-tripped?
If I make changes to generated code, will this change the answer to question 1?
Or, should direct customisation of generated code be avoided? If so, what should be done instead?
Here are answers to your questions:
Q1. Which files should be checked in to version control, and which files should be ignored?
A1. See the documentation on Software Configuration Management with WaveMaker, w
hich outlines which files should be checked-in. All others can be ignored.
Q2. What happens if I want to customise the generated code? Will my customisations be silently overwritten?
A2. WaveMaker Studio executes the code within Studio so your changes are reflected during development and, of course, are executed in your running application. You can further edit within WaveMaker as well.
Q3. Can customised code be round-tripped back into WaveMaker?
A3. Yes, most editors within WaveMaker have a "Refresh from Server" button so if you make changes outside of WaveMaker Studio you can force WaveMaker to re-read the file and load your most recent code. If there is no "Refresh from Server" button you can always close the project and re-open, which will force WaveMaker to re-read your code.
Q4. What about database changes made outside WaveMaker - can they be round-tripped?
A4. See A3.
Q5. If I make changes to generated code, will this change the answer to question 1?
Or, should direct customisation of generated code be avoided? If so, what should be done instead?
A5. I would recommend against editing the widgets.js file that is created for each page in your application. If you edit make sure you re-open the project after editing.