Bringing Cadence, the resource-oriented smart contract language of Flow, to your VSCode Editor.
Install the Cadence extension from the Visual Studio Marketplace
The extension is also available on the Open VSX Registry
Once installed, the extension will help you install other dependencies such as the Flow CLI.
The Cadence extension provides a language server for Cadence. The language server is responsible for providing language features like code completion, diagnostics, and more. It is packaged within the Flow CLI and is managed by the extension.
Use the debugger build into VSCode on Cadence files by creating a launch.json file. Make sure to have an emulator connected to enable debugging.
{
"version": "0.2.0",
"configurations": [
{
"type": "cadence",
"request": "launch",
"name": "Curent file",
"program": "${file}",
"stopOnEntry": true
}
]
}
- Syntax highlighting (including in Markdown code fences)
- Diagnostics (errors and warnings)
- Code completion, including documentation
- Type information on hover
- Go to declaration
- Go to symbol
- Document outline
- Renaming
- Signature help
- Symbol highlighting
- Code actions
- Declare constants, variables, functions, fields, and methods
- Add missing members when implementing an interface
- Apply removal suggestion
- Apply replacement suggestion
- Flow.json schema validation