Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Inline Code RunnerNew to Visual Studio Code? Get it now.
Inline Code Runner

Inline Code Runner

ikydevs-inline-output

|
3 installs
| (0) | Free
Execute JavaScript and Python code inline, similar to Quokka.js
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Inline Code Runner

VS Code extension untuk menampilkan hasil eksekusi kode secara inline (di samping baris kode), mirip seperti Quokka.js.

Fitur

  • ✅ Eksekusi JavaScript (Node.js) dan Python (python3)
  • ✅ Tampilkan output secara inline menggunakan VSCode Decoration API
  • ✅ Format output: => hasil
  • ✅ Support async/await di JavaScript
  • ✅ Error handling ditampilkan inline dengan warna merah
  • ✅ Auto-run (real-time execution) dengan debounce 500ms
  • ✅ Timeout 5 detik untuk keamanan

Bahasa yang Didukung

Ekstensi Runtime
.js, .mjs, .cjs Node.js
.py, .pyw Python3

Cara Install

Prerequisites

  1. Install Node.js dan npm
  2. Install Python3
  3. Install VS Code

Langkah Install

# 1. Clone atau download project ini
cd inline-code-runner

# 2. Install dependencies
npm install

# 3. Compile TypeScript
npm run compile

# 4. Buka folder ini di VS Code
code .

# 5. Tekan F5 untuk run extension di VS Code baru

Cara Pakai

Cara 1: Command Palette

  1. Buka file .js atau .py
  2. Tekan Ctrl+Shift+P (Mac: Cmd+Shift+P)
  3. Ketik Run Inline Code
  4. Tekan Enter

Cara 2: Keyboard Shortcut

  • Windows/Linux: Ctrl+Shift+R
  • Mac: Cmd+Shift+R

Cara 3: Auto-Run (Real-time)

  1. Buka Command Palette
  2. Ketik Enable Auto-Run
  3. Setiap perubahan kode akan otomatis menjalankan kode

Untuk matikan auto-run:

  • Command Palette → Disable Auto-Run

Contoh Penggunaan

JavaScript

Input:

let a = 1;
let b = 2;
console.log(a + b);

Output di Editor:

let a = 1;
let b = 2;
console.log(a + b);   => 3

Python

Input:

a = 1
b = 2
print(a + b)

Output di Editor:

a = 1
b = 2
print(a + b)   => 3

Async/Await (JavaScript)

Input:

const fetchData = async () => {
    return "Hello World";
};
console.log(await fetchData());

Output:

const fetchData = async () => {
    return "Hello World";
};
console.log(await fetchData());   => Hello World

Error Handling

Input:

console.log(undefinedVariable);

Output:

console.log(undefinedVariable);   ❌ ReferenceError: undefinedVariable is not defined

Troubleshooting

Error: "Unsupported file type"

Pastikan file menggunakan ekstensi .js, .mjs, .cjs, .py, atau .pyw

Error: "Node.js/python3 not found"

Pastikan Node.js dan Python3 sudah terinstall dan ada di PATH

Output tidak muncul

  • Coba refresh editor
  • Pastikan tidak ada syntax error di kode
  • Check Output panel untuk error details

Keamanan

  • Timeout 5 detik untuk mencegah infinite loop
  • Hanya execute file lokal
  • Tidak support remote code execution

Lisensi

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft