GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - pkalyankumar1010/playlivecode-vscode-ext

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.vscode-test.mjs
.vscode-test.mjs
 
 
.vscodeignore
.vscodeignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
esbuild.js
esbuild.js
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
playlivecode-0.0.1.vsix
playlivecode-0.0.1.vsix
 
 
playlivecode-0.0.2.vsix
playlivecode-0.0.2.vsix
 
 
playlivecode-0.0.3.vsix
playlivecode-0.0.3.vsix
 
 
playlivecode-0.0.4.vsix
playlivecode-0.0.4.vsix
 
 
tsconfig.json
tsconfig.json
 
 
vsc-extension-quickstart.md
vsc-extension-quickstart.md
 
 

Repository files navigation

PlayLiveCode - VS Code Extension πŸ”

Live code execution from browser to VS Code

This extension enables seamless interaction between your browser and VS Code. With the companion Chrome extension Send to VSCode, you can send code snippets from any webpage (like GitHub, documentation, blogs, etc.) to your local VS Code editor and execute them instantly.


πŸ”§ Features

  • πŸ’‘ Live code execution: Send and run code from your browser into your active VS Code terminal.
  • 🧠 WebSocket Bridge: Opens a WebSocket server on your local machine (ws://localhost:9182) to receive code snippets.
  • πŸš€ Execute from anywhere: Works with any site that contains code blocks β€” GitHub, tutorials, blogs, and more.
  • πŸ”΄ Visual feedback: Hover over code blocks to see an execution button.
  • πŸ§ͺ Lightweight testing: Built-in test mechanism to verify WebSocket and command flow.

🧩 How It Works

  1. Install this extension in VS Code:
    playlivecode-vscode-ext

  2. Install the companion Chrome extension:
    send-to-vscode-chrome-ext

  3. Enable the Chrome extension on websites where you want to send code.

  4. WebSocket Communication:

    • VS Code runs a WebSocket server on ws://localhost:9182.
    • Chrome extension sends code snippets via JSON like:
      {
        "type": "execute code",
        "code": "console.log('Hello from browser!')"
      }
  5. VS Code executes the code in the currently active terminal.


πŸ–₯️ Use Case Demo

Browser (Chrome Extension)

  • Adds a πŸ”΄ dot on the side of each code block.
  • On hover, shows β€œExecute Code” button.
  • Sends selected code to VS Code via WebSocket.

VS Code (This Extension)

  • Listens for messages from the browser.
  • Injects received code into the open terminal.
  • Executes it immediately.

Installation

From the VS Code Marketplace

  1. Open Visual Studio Code.
  2. Navigate to the Extensions view by pressing Ctrl+Shift+X.
  3. Search for Play Live Code.
  4. Click Install.

From a VSIX File

  1. Download the latest playlivecode-0.0.1.vsix from the repository.
  2. In VS Code, press Ctrl+Shift+P to open the Command Palette.
  3. Type Extensions: Install from VSIX... and select the command.
  4. Browse to and select the downloaded VSIX file.

Usage

After installation, access the extension's features using the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS). The following commands are available:

  • Hello World:
    Executes a simple test command to confirm the extension is active.

    • Command: playlivecode.helloWorld
  • Start Session:
    Initiates a live coding session.

    • Command: playlivecode.startsession
  • Send Message:
    Sends a test message within an active session.

    • Command: playlivecode.sendTestMessage
  • Stop Session:
    Terminates the active live coding session.

    • Command: playlivecode.stopWebSocketServer
  • Toggle Auto Start:
    Switches the auto-start functionality on or off.

    • Command: playlivecode.toggleAutoStart

Commands Overview

Command Identifier Command Title Description
playlivecode.helloWorld Hello World Test the extension with a simple greeting.
playlivecode.startsession Start Session Begin a new live coding session.
playlivecode.sendTestMessage Send Message Send a test message during a live session.
playlivecode.stopWebSocketServer Stop Session End the current live coding session.
playlivecode.toggleAutoStart Toggle Auto Start Enable or disable automatic session start.

Requirements

  • Visual Studio Code version 1.97.0 or later.
  • Node.js environment for development and testing (if you plan to contribute).

Development

To set up the development environment:

  1. Clone the Repository:

    git clone https://github.com/pkalyankumar1010/playlivecode-vscode-ext.git
    cd playlivecode-vscode-ext
  2. Install Dependencies:

    npm install
  3. Compile the Extension:

    npm run compile  
  4. Run and Debug:

  • Press F5 to launch a new VS Code window with the extension loaded.
  • Use the Command Palette to test the commands.
  • Set breakpoints in src/extension.ts for debugging.

Enjoy live coding with Play Live Code and happy coding!

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.