A properly configured IDE makes Canton development significantly faster. This page covers setup for writing Daml contracts, building backend services, and working with the full application stack.Documentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
Daml Studio (VS Code)
Daml Studio is the primary IDE for writing Daml smart contracts. It is a VS Code extension that provides language support purpose-built for Daml.Installation
- Install VS Code version 1.87 or later
- Install DPM if you have not already
- From your project directory, run:
Features
Type checking runs continuously as you edit. Errors and warnings appear inline, and the Problems panel shows a summary. Type checking catches most issues before you ever run a test. Script results let you execute Daml Scripts directly from the editor. Click the “Script results” lens that appears above any script definition. The results panel shows the ledger state as a table: active contracts, archived contracts, and the transaction trace. This is the fastest way to verify that your contract logic behaves as expected. Go-to-definition works for templates, choices, type definitions, and imported modules. UseCtrl+Click (or Cmd+Click on macOS) on any identifier.
Code completion suggests template fields, choice parameters, standard library functions, and imported names as you type.
Troubleshooting Daml Studio
If type checking is not working:- Verify that
dpm buildsucceeds from the command line. If the build fails, the IDE cannot type-check. - Check that your
daml.yamlfile lists the correct SDK version and source directory. - Restart the Daml language server: open the VS Code command palette (
Ctrl+Shift+P) and run “Daml: Restart Language Server”.
Java and Scala Backend Development
If your backend is in Java or Scala (common for Canton applications using the Java bindings), IntelliJ IDEA provides the best experience.IntelliJ Setup
- Install IntelliJ IDEA (Community or Ultimate edition)
- Open your project. If using Maven or Gradle, IntelliJ auto-detects the build system.
- After running
dpm codegen-java, mark the generated code directory as a source root so IntelliJ indexes the generated classes.
TypeScript Backend Development
For TypeScript backends (as in cn-quickstart), VS Code is the natural choice. After runningdpm codegen-js, the generated TypeScript types integrate with VS Code’s built-in TypeScript language service for autocompletion and type checking.
Recommended VS Code Extensions
Beyond Daml Studio, these extensions are useful for Canton full-stack development:- Daml — Daml language support (required)
- YAML (Red Hat) — Syntax support for
daml.yaml,docker-compose.yml, and configuration files - Docker (Microsoft) — Manage Docker containers, useful for LocalNet
- Kubernetes (Microsoft) — Helpful if deploying to Kubernetes
- ESLint — Linting for TypeScript/JavaScript frontend and backend code
- Prettier — Code formatting for TypeScript, JSON, and YAML
- GitLens — Enhanced Git integration
Project-Level Configuration
For team consistency, consider adding a.vscode/extensions.json to your repository recommending the Daml extension:
.vscode/settings.json with project-specific settings like file associations and editor formatting rules.
Next Steps
- Development Tools Overview — Summary of all Canton development tools
- Development Environment Setup — Getting started with Daml development
- Debugging Tools — Troubleshoot issues during development