Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SAM Remote DevelopmentNew to Visual Studio Code? Get it now.
SAM Remote Development

SAM Remote Development

Viasat Automation Services Team

|
4 installs
| (1) | Free
Develop SAM tests locally with automatic sync to remote SAM servers
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SAM Remote Development - VS Code Extension

Develop SAM tests locally with automatic sync to remote SAM servers. Lightweight alternative to VS Code Remote Explorer.

Quick Start

1. Install

# Download sam-remote-vscode-X.Y.Z.vsix, then:
code --install-extension sam-remote-vscode-0.1.0.vsix

Or: Extensions → ... → Install from VSIX

2. Configure Servers

Open VS Code settings and add your SAM servers:

{
  "samRemote.servers": [
    {
      "name": "PAT V3G GCP",
      "hostname": "pat-v3g.naw02.sea.viasat.io",
      "port": 22,
      "username": ""
    }
  ]
}

Find SAM server details: SAM Servers Wiki

3. Connect and Use

  1. Cmd+Shift+P → SAM Remote: Connect to Server
  2. Edit test files (auto-syncs on save)
  3. Right-click test file → SAM Remote: Run Current Test

Features

  • Multi-server support - Quick-switch between multiple servers
  • Add servers easily - Guided wizard for adding new SAM servers
  • Auto-sync on save - Debounced file watching (500ms)
  • One-click test execution - Run tests via sam.tcl with custom arguments
  • Test arguments - Pass -var JSON arguments, saved per-test
  • SSH control sockets - Single auth, persistent connection
  • Status bar - Always-visible connection status
  • Keyboard shortcuts - Quick access to common operations
  • Smart error handling - Helpful messages for rsync issues and missing dependencies

Requirements

  • VS Code 1.80.0+
  • SSH client (with key-based auth recommended)
  • rsync
  • SAM server access

Configuration

Quick Setup

Add to .vscode/settings.json or File → Preferences → Settings:

{
  "samRemote.servers": [
    {
      "name": "NAW02 V3G",
      "hostname": "pat-v3g.naw02.sea.viasat.io",
      "port": 22,
      "username": ""  // Empty = use current user
    }
  ]
}

All Settings

Setting Default Description
servers [] Array of SAM server configurations
autoSync true Auto-sync files on save
syncDebounce 500 Debounce delay (ms)
samRoot ${workspaceFolder}/SAM Local SAM directory
remoteSamPath ~/SAM Remote SAM directory
remoteExecutorPath ~/SAM/core/manager/sam.tcl Path to sam.tcl
defaultTestArgs "" Default arguments for sam.tcl (e.g., -var '{"key": "value"}')
excludePatterns [".git", "__pycache__", "*.pyc"] Files to exclude
showSyncNotifications false Show sync notifications

Commands

Command Shortcut Description
SAM Remote: Connect to Server Cmd+Shift+C Connect to a SAM server
SAM Remote: Add New Server - Add a new server configuration
SAM Remote: Run Current Test Cmd+Shift+R Execute current test file with arguments
SAM Remote: Sync Project Now Cmd+Shift+S Manual sync (when connected)
SAM Remote: Disconnect Cmd+Shift+D Disconnect from server (when connected)
SAM Remote: Toggle Auto-Sync - Enable/disable auto-sync
SAM Remote: Show Connection Status - Show status info
SAM Remote: Configure Python Paths - Set up Python import paths

Note: Shortcuts use Ctrl instead of Cmd on Windows/Linux.

Usage Tips

Running Tests with Arguments

When you run a test (Cmd+Shift+R or right-click → "Run Current Test"), you'll be prompted for arguments:

  1. First time: Choose "Run with Custom Arguments" and enter args like -var '{"speed": 10}'
  2. Save option: Extension will ask if you want to save these args for future runs
  3. Subsequent runs: One-click "Run Test" uses saved args
  4. Change args: Select "Run with Custom Arguments" to modify

Arguments are saved per-test file and persist across VS Code sessions.

Adding a New Server

Two ways to add servers:

Option 1: Guided wizard (recommended)

  1. Cmd+Shift+P → "SAM Remote: Add New Server"
  2. Follow the prompts (name, hostname, port, username)
  3. Optional: Open SAM Servers wiki for reference
  4. Connect immediately or save for later

Option 2: Manual in settings.json

{
  "samRemote.servers": [
    {
      "name": "Your Server Name",
      "hostname": "server.hostname.com",
      "port": 22,
      "username": ""  // Empty = current user
    }
  ]
}

Find SAM server details: SAM Servers Wiki

Troubleshooting

rsync not found on remote server:

  • Extension will detect this and show install instructions
  • SSH to server: ssh -p PORT user@hostname
  • Install: sudo yum install rsync (RHEL) or sudo apt-get install rsync (Ubuntu)

File sync fails after connecting:

  • Run "SAM Remote: Sync Project" to establish full directory structure
  • Individual file syncs need parent directories to exist remotely

Connection timeout:

  • Check SSH key authentication is working: ssh -p PORT user@hostname
  • Extension waits 15 seconds for connection
  • Check Output panel (View → Output → "SAM Remote") for details

Changelog

1.1.2

  • Fix changelog
  • Remove default server list

1.1.1

  • Exclude non-essential files from .vsix bundle

1.1.0

  • Prompt user to check SAM root if it does not end in /SAM
  • Log SAM root in plugin output

1.0.0

  • Initial release
  • Multi-server support, auto-sync, test execution
  • Add New Server wizard
  • Test arguments with per-test persistence
  • Keyboard shortcuts
  • Smart error handling for rsync and connection issues
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft