In VS code need to perform open with live server every time to see changes done in code on web browser - visual-studio-code

I have installed extension called live server in vs code, So that Till yesterday I could open my HTML file on browser directly from VS code through open with live server option , and if I performed any changes to code browser get automatically reloaded with new changes.
But now I need to always select open with live server option to see effects of updated code in my browser. Browser not automatically reloaded, manually reloading also doesn't have any effect.
Any buddy know solution please help me.

Watch this video it explains clearly https://youtu.be/wMmu_369n7c, Other wise install extension called SaveTyping by Michel Betancourt.

Related

Visual Studio Code losing connection to Live Server

I worked on media queries on my website today and all of a sudden my browser won't refresh the site but rather says "No internet. ERR_INTERNET_DISCONNECTED.
I am using Visual Studio Code with Live Server by Ritwick Dey.
Console warning says "DevTools failed to load source map: Could not load content for chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/browser-polyfill.js.map: System error: net::ERR_FILE_NOT_FOUND"
"VM10:6745 crbug/1173575, non-JS module files deprecated."
1 Issue: "Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform"
The site is on my laptop and I'm just working on it offline. What the heck is going on here?
I tried removing the queries.css file to see if that would make a difference. It did not.
Any link on the site will take me to this NO INTERNET page if I am in the responsive dimensions part of DevTools. Also when there is any edit to the html or css in VSC it immediately results in this NO INTERNET page appearing and I have to shut down the port and Go Live again.
I also opened the practice website that we are building for the class and the same thing is happening with that one as well. I have checked my html and css files on validator.w3.org and they have all checked out.
I tried changing the settings in VSC to set the browser to Chrome and also tried in Edge with the same results.
I removed the extension from VSC and reinstalled. No results. Please help!
I had to go into the settings in Devtools and reset.
open Devtools
click the gear icon at right side
scroll to bottom of settings
click "restore defaults and reload"
This made a whole variety of strange problems go away in Devtools and now it works as it should.

Live server refreshing every second without changes in code file

When I'm using Live Server extension in VS Code, my browser is refreshing every second, even though I do not make nor save any changes in my code file.
Why is that happening and how to solve this problem?
Can anybody help me? :)
I had the same problem. The issue was my (unrelated) script was running in background and writing to a file in the same directory. Live server detected these changes and sent the "reload" request to the browser.
I had this issue recently as well, and I spoke with a couple of people while testing various browsers.
We figured out that the issue was there was too much loaded into VSCode and it was looking through every single project/written code.
I closed VSCode down and then opened my repo for the particular project in terminal. I then used code . which opens VSCode, it opened only that specific repo/folders and then tried using Live server which worked perfectly with no refreshes happening.

How Do I Make my Site Automatically Reload When I Change my HTML?

When I write HTML, I have Google Chrome open on one side and VS Code on the other. Then when I save, I go to Chrome and reload the page. However, how do I make it so that when I save my code, the page automatically reloads in Chrome?
Use a live server. One such option is the Live Server VS Code extension. You could also use the live-server NPM package or the live-server PyPI package.
There are plenty of options out there, just pick the best one for your needs.

Get the real-time web design preview from the browser

Assume that I have two monitors assigned to my pc. Now I want to get the preview of a web site while coding it. Is there anyway to do this?
eg:- Do the coding from sublime text from a one monitor and the meantime watch the output from the Firefox web browser.
I have used live.js for this more than once. It can work either as a bookmarklet or embedded on your page, and it works in any browser as it's not an extension. Also requires no other software to work.
The downside is it that it will flood your developer tools with HEAD requests every second or so to determine when to reload things. That's the cost of not having to install external software.
You can use the LiveReload plugin for SublimeText. It listens for changes to your code files and updates them in the browser in real time.
Also, do not forget to add the respective browser extension. That should save you from adding any scripts into your page.
You could use yeoman ( with Grunt or Gulp depends on which generator you want to use ).

Configuring VB6 with VSS 2005

I have configured VB6 with VSS 2005, following functionality working fine :
Check In and Check Out of code
Get Latest Version
Showing error when code Check Out by another user.
Showing error if use try to edit code without Check In ( only when user takes latest version)
Difference I am finding in VB.Net and VB6 configuration with VSS are :
Code not getting Check In automatically when user try to edit code, without Check In Code.
Not allowing user to save changes and Check In code later after 1 or 2 days. User require Check In code before closing code.
Showing "Path/File access error:" for .vbp file.When user tries to save code on machine.
Allowing user to edit code without Check in when user opens the code first time.
I did all the settings mentioned in this link.
As MarkJ mentioned the vbp file is always saved when the application runs. You can cancel out of the dialog to run the project anyway but this is more hassle than just right clicking on the project root and checking out.
I am using Team Foundation Server with my VB6 projects and there is no auto check out in this either. I'm afraid you will have to live with it until you port the code the .NET
As I mentioned heredead link: WayBack version there is also a problem when you have some files or documents not in SourceSafe.
Specifically (as I still document here), when some of the files of a project are not associated with SourceSafe often no files have their SourceSafe status glyphs displayed.
The workaround I found was displaying the Add Files dialogue and then cancelling it. I offer my public domain add-in that automatically implements this workaround.
And BTW, make sure you install the latest VSS Service Pack.