/vscode-velma-debug

VS Code Extension for the Velma Solidity Debugger

Primary LanguageTypeScriptMIT LicenseMIT

⚠️ This repository is no longer maintained

Due to conflict of interests, I am no longer able to support development on Velma. Please feel free to fork it!

Velma Solidity Debugger - VS Code Extension

This repository contains the VS Code extension which integrates with the Velma Solidity Debugger. Design and implementation decisions for MVP v1.0.0 were heavily guided by the needs of Augur and Augur's application.

⚠️ Velma is alpha software! We're still working out a lot of kinks/bugs so please bare with us ⚠️

Get Status Updates About Releases!

Follow us on Twitter at https://twitter.com/seeseplusplus to get updates about new releases/etc about Velma

Submitting Issues

Unless you know for certain the issue belongs in this repository, please submit issues related to the Velma Debugger at the debugger main repo

Prerequisites

You must install a Solidity language VS Code extension; I suggest the one from Juan Blanco. I suggest that you change the keyboard shortcut this extension uses to compile the Solidity file as it defaults to F5 and inhibits smooth debugging (if you left the default F5 command for continuing while in a debug session). You can do this following the below instructions:

  1. Press Ctrl+Shift+P (or Command+Shift+P) to open the settings quick open popup
  2. Search for and open Preferences: Open Keyboard Shortcuts (with the preceeding > that should already be entered)
  3. In the search box in the Keyboard Shortcuts tab, search for solidity.compile.active
  4. Click the edit pencil on the left of the row and enter a different keyboard shortcut that isn't F5

Installing the extension (which includes the debugger)

  1. Go to https://github.com/seeseplusplus/vscode-velma-debug/releases and navigate to the latest versioned tag
  2. Download the attached vscode-velma-debug-{version}.vsix file
  3. Open VS Code
  4. Go to the Extensions panel (default shortcut: Ctrl+Shift+X or Command+Shift+X)
  5. Click the horizontal dots in the top right of the Extensions panel
  6. Click "Install from VSIX..."
  7. Select the downloaded VSIX file
  8. Reload VS Code

Current Limitations (of both Velma and Velma VS Code Extension)

  • Currently only basic array (1-Dimensional, fixed-size (i.e. not dynamic)) variable inspection support.
  • No hover REPL/Debug Console viewing support
  • No backwards stepping support
  • Important: Until my changes to 3rd party repos have been merged and released to NPM, you must use the associated GitHub links. You can find the supporting GitHub repositories at https://github.com/seeseplusplus. These versions of the repos (i.e. 1.0.0-rc.1 branches) are likely out of date from the upstream repo. Please take this into consideration when testing

Sample project

For the scope of the Augur bounty, the only way you can currently use the debugger is through Ganache (formally TestRPC). The recommended method is by setting up a Mocha test which will compile the contracts, upload them to the Ganache, link the debug symbols (aka compilation output and contract addresses) to Velma, and execute transactions.

I highly recommend you familiarize yourself with the test application before integrating your own project.