Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>Anode DebugNew to Visual Studio Code? Get it now.
Anode Debug

Anode Debug

Anode

|
39 installs
| (0) | Free
Debug anode automation scripts running on Android devices
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Anode Debug for Visual Studio Code

Debug anode automation scripts running on Android devices directly from Visual Studio Code.

Features

  • Debug JavaScript Scripts: Set breakpoints, step through code, and inspect variables in anode scripts running on Android devices
  • Device Discovery: Automatically discover anode-enabled devices via USB (ADB) and WiFi (mDNS)
  • Multiple Connection Types: Connect via USB or WiFi
  • Real-time Console: View script output and logs in real-time
  • Source Mapping: Support for source maps with configurable path overrides
  • Variable Inspection: Examine variables, objects, and call stacks during debugging
  • Hot Reload: Sync code changes to device without restarting

Requirements

  • VSCode: Version 1.74.0 or higher
  • Android Device/Emulator: Running anode app with debug server enabled
  • ADB: Android Debug Bridge installed and accessible in PATH (for USB connections)
  • Node.js: Version 14 or higher (for development)

Quick Start

1. Install the Extension

Install from VSCode Marketplace or build from source:

npm install
npm run compile

2. Connect Your Device

USB Connection:

  1. Enable USB debugging on your Android device
  2. Connect device via USB
  3. Authorize the computer when prompted

WiFi Connection:

  1. Ensure device and computer are on the same network
  2. Enable debug server in anode app settings
  3. Extension will auto-discover devices via mDNS

3. Configure Debug Launch

Create a .vscode/launch.json in your project:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "anode",
      "request": "launch",
      "name": "Debug Anode Script",
      "script": "${file}",
      "projectPath": "${workspaceFolder}",
      "stopOnEntry": false
    }
  ]
}

4. Start Debugging

  1. Open a JavaScript file
  2. Set breakpoints by clicking in the gutter
  3. Press F5 or click "Start Debugging"
  4. Select your device when prompted

Configuration

Extension Settings

Configure in VSCode settings (File > Preferences > Settings):

  • anode.debug.port: Debug server port (default: 9229)
  • anode.debug.timeout: Connection timeout in ms (default: 10000)
  • anode.debug.maxRetries: Maximum connection retry attempts (default: 3)
  • anode.adb.path: Path to ADB executable (default: "adb")
  • anode.debug.verbose: Enable verbose logging (default: false)

Launch Configuration Options

Launch Request:

{
  "type": "anode",
  "request": "launch",
  "name": "Debug Current Script",
  "projectPath": "${workspaceFolder}",
  "script": "${file}",
  "device": "auto",
  "connectionType": "auto",
  "port": 9229,
  "stopOnEntry": false,
  "timeout": 10000,
  "sourceMaps": true,
  "sourceMapPathOverrides": {
    "/storage/emulated/0/anode/projects/*": "${workspaceFolder}/*"
  },
  "scriptArgs": [],
  "env": {},
  "auth": {
    "token": "${env:ANODE_DEBUG_TOKEN}"
  }
}

Attach Request:

{
  "type": "anode",
  "request": "attach",
  "name": "Attach to Process",
  "device": "auto",
  "processId": 0,
  "projectPath": "${workspaceFolder}",
  "port": 9229
}

Commands

  • Anode: Start Debugging (anode.debug.start) - Start debugging current file
  • Anode: Select Device (anode.selectDevice) - Choose target device
  • Anode: Sync Project (anode.syncProject) - Sync project files to device
  • Anode: Show Device Logs (anode.showDeviceLogs) - View device logs
  • Anode: Generate Debug Token (anode.generateToken) - Generate authentication token

Troubleshooting

Device Not Found

USB Connection:

  • Verify ADB is installed: adb version
  • Check device is connected: adb devices
  • Ensure USB debugging is enabled on device

WiFi Connection:

  • Verify device and computer are on same network
  • Check anode debug server is running in app settings
  • Verify port 9229 is not blocked by firewall

Connection Timeout

  • Increase timeout in settings: anode.debug.timeout
  • Check anode app is running on device
  • Verify debug server is enabled in anode settings

Breakpoints Not Working

  • Ensure source maps are enabled
  • Verify sourceMapPathOverrides matches your project structure
  • Check script is actually being executed on device

Development

Building from Source

# Clone repository
git clone https://github.com/yunxi/vscode-anode-debug.git
cd vscode-anode-debug

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch for changes
npm run watch

Debugging the Extension

  1. Open project in VSCode
  2. Press F5 to launch Extension Development Host
  3. Set breakpoints in extension code
  4. Test with sample anode scripts

Known Issues

  • Source mapping requires exact path configuration
  • WiFi discovery may take several seconds
  • Some devices may require manual IP configuration

Release Notes

1.0.0

Initial release:

  • Basic debugging support (breakpoints, stepping, variables)
  • USB and WiFi device discovery
  • Source mapping support
  • Real-time console output
  • Device selection UI

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

License

MIT License - see LICENSE file for details

Links

  • Anode Documentation
  • GitHub Repository
  • Issue Tracker
  • VSCode Extension API
  • Debug Adapter Protocol

Support

For questions and support:

  • GitHub Issues: https://github.com/yunxi/vscode-anode-debug/issues
  • Documentation: https://anode.yunxi.com/docs/vscode-extension
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft