Prevent VsCode live server to scrolling up - visual-studio-code

I'm having an annoying issue with vscode live server. Every single time I hit ctrl+save or even when the files autosaves itself, vscode scroll the page up to the top of it. Sometimes when the page it's big, it just scrolls up to some random point on the page. It happens with every single page I code on Vscode using live server extension.
I tried to reinstall vscode and live server extension. I also found out that some people fixed this ticking "Settings:Full Reload" box. But also didn't work for me.
I just want that when I save the file the browser keeps the same position on the screen. I think code withou a live server feature is really wierd, but this issue is driving me crazy!!!

For me it works "Settings:Full Reload" but remember you have to close server before do that change

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.

Chrome devtools tab reopens the wrong source files after a refresh

When I use chrome to debug my angular project, I open files in the chrome sources by clicking Ctrl+P/O and entering part of the name. Problem is: when I reload, seems chrome keeps all the wrong files open... so if I debugged into another file (didn't close it! just lost focus) and then reload (like, after sources changed and compiled) chrome will close that file, and might even not remember it in the open recents dropdown... It's like someone sorted in reverse for some reason...
Is there a way to fix the wrong sorting order through settings or configuration somehow?
Am I the only one finding this not very smart/useful? Considering debugging in browser is a pain in the arse as it is, and unfortunately is the only/go-to option for debugging browser apps...

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.

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

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.

Chrome devtools enable cache

I see a lot of questions about how to disable the browser cache in Google Chrome in order to see the changes on the server, but I have the opposite problem. It seems my browser is doing a hard reload every time I press f5. I want to see how the page looks with my javascript edits. How can I do that?
Pressing only F5 does not do a hard reload in Chrome. When you press F5, the local changes that you've made in CSS or JavaScript will be lost. They don't get stored in the cache. However, you should be able to see your JavaScript changes in devtools take effect if that JavaScript part has not yet been called (like document load event).