All Projects β†’ jevakallio β†’ Vscode Live Frame

jevakallio / Vscode Live Frame

Licence: mit
Run your web app inside VS Code

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Vscode Live Frame

Vscode Better Merge
Better merge conflict support for vscode
Stars: ✭ 46 (-73.41%)
Mutual labels:  vscode, extension
Vscode Vega Viewer
VSCode extension for Interactive Preview of Vega & Vega-Lite maps πŸ—ΊοΈ & graphs πŸ“ˆ
Stars: ✭ 75 (-56.65%)
Mutual labels:  vscode, extension
Vscode Glua Enhanced
πŸ‘¨β€πŸ’» Garry's Mod Lua VSCode Extension for enhanced auto completion, wiki integration, snippets, color palette, and much more...
Stars: ✭ 64 (-63.01%)
Mutual labels:  vscode, extension
Vscode Todo Plus
Manage todo lists with ease. Powerful, easy to use and customizable.
Stars: ✭ 622 (+259.54%)
Mutual labels:  vscode, extension
Vscode Twitch Highlighter
This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
Stars: ✭ 169 (-2.31%)
Mutual labels:  vscode, extension
Snipsnap
The ultimate snippets collection for VS Code
Stars: ✭ 840 (+385.55%)
Mutual labels:  vscode, extension
Vscode Highlight
Advanced text highlighter based on regexes. Useful for todos, annotations etc.
Stars: ✭ 71 (-58.96%)
Mutual labels:  vscode, extension
Openvsx
An open-source registry for VS Code extensions
Stars: ✭ 344 (+98.84%)
Mutual labels:  vscode, extension
Service Worker Detector
This extension detects if a website registers a Service Worker.
Stars: ✭ 124 (-28.32%)
Mutual labels:  extension, developer-tools
Flowmaker
flowmaker: JS to SVG flowchart generation extension for Vscode in realtime written in typescript and also download the SVG through local node server. Extension:
Stars: ✭ 108 (-37.57%)
Mutual labels:  vscode, developer-tools
Vscode Es7 Javascript React Snippets
Extension for Javascript/React snippets with search supporting ES7 and babel features
Stars: ✭ 435 (+151.45%)
Mutual labels:  vscode, extension
Vscode Open In Github
Extension for Visual Studio Code which can be used to jump to a source code line in Github, Bitbucket, GitLab and Visualstudio.com
Stars: ✭ 151 (-12.72%)
Mutual labels:  vscode, extension
Amvim For Vscode
The Vim mode for Visual Studio Code(vscode) that works as expected.
Stars: ✭ 393 (+127.17%)
Mutual labels:  vscode, extension
Vscode Simple Vim
Vim extension for VSCode
Stars: ✭ 38 (-78.03%)
Mutual labels:  vscode, extension
Bracketpair
Bracket Colorizer Extension for VSCode
Stars: ✭ 374 (+116.18%)
Mutual labels:  vscode, extension
Vscode Php Docblocker
Simple docblocker for php
Stars: ✭ 64 (-63.01%)
Mutual labels:  vscode, extension
Vscode Cordova
A Visual Studio Code extension providing intellisense, debug, and build support for Cordova and Ionic projects.
Stars: ✭ 267 (+54.34%)
Mutual labels:  vscode, extension
Frontend Vscode Extensionpack
(820+ Users) Handpicked collection of vscode extensions for FE development. Get the extension @ https://marketplace.visualstudio.com/items?itemName=solodynamo.frontend-vscode-extensionpack
Stars: ✭ 329 (+90.17%)
Mutual labels:  vscode, extension
Vuerd Vscode
ERD Editor vscode extension
Stars: ✭ 95 (-45.09%)
Mutual labels:  vscode, extension
Vscode Mjml
This repo is archived. MJML preview, lint, compile for Visual Studio Code.
Stars: ✭ 138 (-20.23%)
Mutual labels:  vscode, extension

VS Code Live Frame

Run your web application inside VS Code.

Why would you want to do that?

You're developing a web application, and you've got some kind of a live/hot reloading setup. Instead of switching between your editor and a browser, with Live Frame you can see your changes without leaving VS Code.

Or, perhaps, you're streaming or recording a screen cast, and you just want everything nicely in one window. Whatever your reasons, we're not here to judge.

Demo

How to use it

  1. Install Live Frame from the VS Code Marketplace.
  2. Start your local development server
  3. Run (Cmd+Shift+P) command Live Frame: Open
  4. Follow the displayed configuration instructions.

Extension Settings

Add the following to your User or Workspace settings. Given that your app's development URL is probably project specific, Workspace settings may make more sense.

{
  // Required: The website to display
  "liveFrame.url": "http://localhost:3000",

  // Optional: Title for the pane tab heading
  "liveFrame.title": "Local Development",

  // Optional: Which pane to open the frame in
  "liveFrame.pane": "Beside"
}

If you have a fast hot reloading setup, you can turn on VS Code's Auto Save on a short delay when you need an extra blazing feedback loop.

{
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 50,
}

Known Limitations

Because of the way Live Frame renders your site in an iframe-inside-webview, there are a couple of limitations.

Your site needs to be able to run in an iframe

If your website prevents itself being loaded in an iframe e.g. via X-Frame-Options or Content-Security-Policy, it won't work inside Live Frame.

This should not be an issue for most development setups, but if it is, try VSCode Browser Preview instead.

Dev tools work, but element selector doesn't

You can open dev tools by running (Cmd+Shift+P) the Open WebView Developer Tools command. However, the point and click element selector doesn't select element inside the iframe.

Command key combinations (Copy, Paste, Select all...) are disabled

This is a known issue in VS Code.

As a workaround, you can send your keystrokes to the extension using postMessage, and we'll forward them to VS Code for you. Just add the following somewhere in your application code:

if (window.parent !== window) {
  // If using TypeScript, next line should be:
  // let listener = (e: KeyboardEvent) =>
  let listener = (e) =>
    window.parent.postMessage(
      JSON.stringify({
        altKey: e.altKey,
        code: e.code,
        ctrlKey: e.ctrlKey,
        isComposing: e.isComposing,
        key: e.key,
        location: e.location,
        metaKey: e.metaKey,
        repeat: e.repeat,
        shiftKey: e.shiftKey,
      }),
      "*"
    );

  if (!window.hasOwnProperty("keyhookInstalled")) {
    // If using TypeScript, next line should be:
    // (window as any).keyhookInstalled = true;
    window.keyhookInstalled = true;
    window.addEventListener("keydown", listener);
  }
}

If you can think of a better solution (to fix the keyboard issue, or that doesn't involve using an iframe at all), see Contributing.

Infrequently Asked Questions

Which bundlers, dev servers etc. does Live Frame support?

All of them. Livereload, webpack, vite, servor, whatever angular people use... shouldn't matter. If yours doesn't work, double check it's not your own fault, and open an issue.

Wait, didn't this exist before?

Sort of. Browser Preview embeds a headless Chrome, which is awesome, but also very resource intensive and kept crashing my VS Code. Then there are about a dozen extensions that live reload HTML in various ways, but if you're working with a web application with a build step, they're no use.

Live Frame takes a simple but lightweight route and uses a VS Code Webview pane, and inside it renders your app in a full-screen iframe. You can see the full implementation in extension.ts.

So is this exactly like a regular Chrome environment?

Not really. It's an embedded Electron webview with known limitations, and I'm sure many other minor differences to a full browser.

Use at your own peril during development, not for acceptance testing!

Release Notes

0.1.1

Add workaround for keyboard binding issue.

0.1.0

Initial release.

Contributing

Pull requests are welcome! For anything that significantly grows the scope of this project or complicates its maintenance, please open an issue to discuss first.

Local development

Install dependencies with yarn, and run the project with Run > Start Debugging from within VS Code.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].