Coder Social home page Coder Social logo

vscode-simple-auto-reload's Introduction

Simple Auto Reload

This extension uses the DevTools protocol (available in most browsers) to auto reload a page after saving files.

It requires no browser extension or code changes.

Setup

Make sure your browser is running with remote debugging port enabled.

  • Chrome: google-chrome --remote-debugging-port=9222
  • Android: adb forward tcp:9222 localabstract:chrome_devtools_remote
  • Opera: opera --remote-debugging-port=9222
  • Safari (iOS): Install and run iOS WebKit Debug Proxy
  • Edge: MicrosoftEdge.exe --devtools-server-port 9222
  • Firefox: firefox --remote-debugging-port 9222

Usage

Once the browser is running, use the command Auto Reload: select tab to choose which of the currently open tabs will be reloaded when saving. That's it. Next time you save a file, that tab will reload.

If you want to stop reloading, run the command Auto Reload: stop.

Remote Development Environments

The extension runs locally in the UI environment so is automatically fully compatible with VS Code's Remote Development options provided the browser is on the same machine as the VS Code UI interface.

vscode-simple-auto-reload's People

Contributors

dependabot[bot] avatar fserb avatar samfoley88 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

vscode-simple-auto-reload's Issues

Error running on MacOS

Trying to get this to run on Mac and keep getting this error in vscode:
Command 'Auto Reload: Select tab' resulted in an error (Running the contributed command: 'vscode-simple-auto-reload.selectTab' failed.)

Steps

  1. Ran /Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox --remote-debugging-port 9222
  2. Outputs: DevTools listening on ws://localhost:9222/devtools/browser/bf6eff50-02f8-4340-90c3-38eb53b1be37
  3. Ran Auto Reload: Select Tab
  4. Outputs: Command 'Auto Reload: Select tab' resulted in an error (Running the contributed command: 'vscode-simple-auto-reload.selectTab' failed.)

I've tried restarting both code and firefox, tried launching them in different orders etc and still not got anywhere.

Any ideas where this might be going wrong?

Introduce delay?

This extension seems to work great.

Am wondering if it would be possible to introduce a customisable delay, e.g. 1.5 seconds - to give a server a chance to recompile for example?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.