Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Block Runner For MarkdownNew to Visual Studio Code? Get it now.
Block Runner For Markdown

Block Runner For Markdown

blockrunnerformd

|
19 installs
| (1) | Free
Block runner for markdown via two ways: 1. run as tmp file, 2. run as repl at current active terminal.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Code Block Runner for VS Code

This extension allows you to execute code blocks in any programming language directly from Markdown files in VS Code.

Run Code Block Run Code Snippet Run On Markdown

Features

  • Execute Code Blocks: CodeLens Buttons appear above each code block (```) for running or copying the code. Temporary files are created for execution and are cleaned up afterward.
  • Execute Code REPL: Run code in REPL with Ctrl + Click. Results are displayed in the REPL(active termial).
  • Save Execution Results: Execute code directly within Markdown files, with the output captured in the document.
  • Broad Language Support: Supports a wide range of languages, including C, Rust, C++, Java, TypeScript, PHP, Perl, R, Dart, Groovy, Go, Haskell, Julia, Lua, Ruby, JavaScript, Python, Bash. Add non-compiled languages via settings.
  • Python Indent process in REPL
    # this snippet will NOT break in REPL
    def my_function():
      1
    
      2
      3
    
    print('aa')
    

Requirements

Before running a code block:

  • Verify "Compiler Configuration" settings are correct.
  • Ensure your code is correct.
  • Install necessary languages and dependencies.
  • Add compilers to the PATH environment variable if necessary to enable global access to installed languages.

On Arch Linux, install all supported languages with:

sudo pacman --needed -S php perl r dart groovy go rustup ghc julia lua ruby nodejs npm python bash

For other systems, research language installation or use the Windows Subsystem for Linux.

Demo File

Download or copy DEMO.md and the demo_helpers folder into VS Code after installing this extension, and test all the features out!

Extension Settings

Compiler Configuration

  • Configure language compilers by specifying Item: Code Block Tag and associated Value: [Language Name, File Extension, Compiler Command/Path]. Only non-compiled languages can be added.
// Example
Item: python, Value: ["Python", "py", "python"]
  • Reset settings using the ↻ icons or remove the blockrunnerformd.compilerConfiguration entry from VSCode's settings.json to restore to default if any issues occur.

Python Path

Enable this to add the Markdown file's parent directory to Python's sys.path, allowing you to import modules from that directory.

Future Development

Planned features (no guarantee):

  • Support for multiple Run on Markdown output streams.

Your feedback and contributions are welcome in shaping the future of this extension!

License

GPL-3.0 license

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