Skip to content

VS Code and Cursor reference

The v0.2.12 extension runs as a workspace extension and embeds the same loopback viewer in VS Code or Cursor webviews. It is distributed as beatricebm.dcmview through the VS Code Marketplace and Open VSX.

  • Linux x64
  • macOS x64
  • macOS arm64
  • Windows x64

Set dcmview.binaryPath on another platform or when testing a locally built binary.

Command Purpose
dcmview: Open with dcmview Open a selected file or directory.
dcmview: Open Workspace with dcmview Open a selected workspace folder.
dcmview: Stop All dcmview Sessions Stop extension-managed viewers.
dcmview: Show Bridge Status Inspect the terminal-bridge state.

The extension also registers a read-only custom editor for *.dcm, *.dicom, and *.ima names. Extensionless DICOM objects and directories use the Explorer context command.

Setting Type Default Behavior
dcmview.binaryPath string "" Absolute binary override.
dcmview.defaultRecursive boolean true Recursively scan selected directories.
dcmview.extraArgs string array [] Arguments inserted before selected paths.
dcmview.startupTimeoutSeconds number 20 Seconds to wait for a startup URL; minimum 1.
dcmview.terminalInterception.enabled boolean true Route supported commands in new integrated terminals into webviews.

The normal launch shape is:

dcmview --no-browser --port 0 --host 127.0.0.1 --startup-json [extra args] <PATH>...

When default recursion is disabled, the extension also includes --no-recursive.

The extension checks:

  1. dcmview.binaryPath.
  2. target/debug/dcmview or target/debug/dcmview.exe in a source checkout.
  3. Its Marketplace-bundled resources/bin/<platform>-<arch>/ executable.
  4. dcmview or dcmview.exe on PATH.

When interception is active but the extension cannot resolve a local executable, it may accept a trusted absolute client path supplied by the Python wrapper. On Unix that file must belong to the current user and must not be group- or world-writable; its filename must be dcmview or dcmview.exe.

The extension creates authenticated loopback bridge endpoints and short-lived registry records for active workspaces. A Rust CLI or Python launch must match the workspace path before it uses a registry endpoint.

Supported intercepted command forms are dcmview, dcmview-py, and python -m dcmview_py in integrated terminals created after activation. Set DCMVIEW_VSCODE_BYPASS=1 to force an ordinary local launch.

The bridge URL and bearer token variables are extension-managed. Do not copy them into persistent shell configuration. Registry records expire after three hours and use permission checks on Unix.

See the VS Code and Cursor guide for the user workflow and troubleshooting for startup failures.