dsh-py-runner

VSCode-style Python console in the DSH sidebar: it opens .py files in an editor with line numbers and Python syntax highlighting, lets you pick the interpreter, and runs the file with Run / Debug / Stop while stdout, stderr and the exit code stream into a panel below. Debugging drives a real DAP session through debugpy: click the gutter to set breakpoints, then step, pause, inspect the call stack, expand variables and evaluate watch expressions; a missing debugpy can be installed from the panel in one click. Ctrl+Enter runs, Ctrl+Shift+Enter starts debugging. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Overview

VSCode-style Python console in the DSH sidebar: it opens .py files in an editor with line numbers and Python syntax highlighting, lets you pick the interpreter, and runs the file with Run / Debug / Stop while stdout, stderr and the exit code stream into a panel below. Debugging drives a real DAP session through debugpy: click the gutter to set breakpoints, then step, pause, inspect the call stack, expand variables and evaluate watch expressions; a missing debugpy can be installed from the panel in one click. Ctrl+Enter runs, Ctrl+Shift+Enter starts debugging. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installation

Install from GitHub

dsh plugin --profile web add github:amzingluo/dsh-py-runner

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.

Installation notes

  • May run terminal commands