Visual Studio Code

MythX accessible directly in your editor

The MythX VSCode extension is no longer actively maintained. It will still work for most cases, but we strongly recommend using the MythX CLI instead.

MythXvsc is an extension for running MythX smart contract analysis from Visual Studio Code.

The extension provides:

  • Smart contract compilation (via the Solidity VS Code extension)

  • Authentication to the MythX platform

  • AST extraction from compiled source

  • Submission of analysis

  • Displaying analysis result in VS Code in a linting fashion

You need to sign up for a MythX account in order to use the MythX extension for VS Code.

For information on plans and features, please see our plans page.

Dependencies

The MythXvsc extension depends on the Solidity extension by Juan Blanco. Make sure to download this from Visual Studio Code Marketplace before installing MythXvsc.

Installation

Install from the Visual Studio marketplace.

Authentication

First, generate an API key on the dashboard. After installing the extension, copy the key and paste it in the VS Code user settings as shown below.

Usage

Open a Solidity file from inside a folder or workspace, and click the MythX: Analyze smart contract button that you will see in the top right of your IDE window.

Otherwise, right click with your mouse on the contract name and you will see the command there.

MythX allows users to choose from three different scan modes. This extension supports all three. By default, the extension will run Quick mode. If you want to run Standard or Deep scan modes, you can do so through the VSCode command palette. Type >mythx and select the scan mode you desire.

Different plans have access to different modes. Please refer to the MythX Pricing page to see which plan you need for each mode.

When the analyses is submitted, you are provided with a link to the MythX Dashboard, where the analyses report will be available when the analyses is completed.

Once the analysis is over, you will see your smart contract issues highlighted in your code. The exact time it takes to perform an analysis will depend on the mode selected and the plan associated with your account.

Last updated