This extension adds support for the Erlang language to Visual Studio Code, including editing, building and debugging.
- Syntax highlighting
- Automatic indentation
- Erlang IntelliSense
- Shows errors and warnings dynamically while you type
- Go To Definition/Peek Definition
- Hover help for standard functions
- Hover for project functions showing head clauses
- CodeLens showing exported functions and references
- InlayHints showing parameters name in function calls
- disable by default : enable in configuration settings
- limits : only works with locals calls
InlayHints in function calls
- showing parameter name when it doesn't match with caller var name
- Standard rebar3 is the default build tool, also rebar is supported. The rebar.config file should be placed in the root directory.
- Build arguments are configurable, by default "compile" is used
- You can override the default in configuration file (i.e. workspace settings)
- Variables List shows variables from the current scope
- Call Stack shows Erlang processes and allows to control them with e.g. Pause and Continue
- Standard commands Step Over, Step Into, Step Out supported
- Full breakpoints support:
- Regular breakpoints
- Function Breakpoints: use format module:function/arity
- Conditional Breakpoints
- Hit-Count Breakpoints
You can provide a specific command line to 'erl' in launch.json configuration file in "arguments" entry.
The modified code may be automatically build before debugger is started. To set automatic build up you need to:
- Add to launch.json file the entry "preLaunchTask": "rebar3 compile"
- Select Configure Task in the alert, choose Create tasks.json file from template and then Others: Example to run an arbitrary command
- This will create tasks.json for you. Change both label and command to "rebar3 compile".
- Add entry "problemMatcher": "$erlang"
Then, before debugging is started, modified files will be recompiled automatically.
Clone this repo, and try it :
For more information about vscode and containers :
Support for Erlang tools, including rebar3, EUnit and Dialyzer
- Dialyzer warnings displayed in Problems tab for easy navigation
erlang.erlangPath
- Directory location of erl/escripterlang.erlangArgs
- Arguments passed to Erlang backenderlang.erlangDistributedNode
- Start the Erlang backend in a distributed Erlang node for extension developmenterlang.rebarPath
- Directory location of rebar/rebar3erlang.rebarBuildArgs
- Arguments to provide to rebar/rebar3 build commanderlang.includePaths
- Include paths are read from rebar.config, and also standard set of paths is used. This setting is for special cases when the default behaviour is not enougherlang.linting
- Enable/disable dynamic validation of opened Erlang source fileserlang.codeLensEnabled
- Enable/Disable CodeLenserlang.inlayHintsEnabled
- Enable/Disable InlayHintserlang.verbose
- Activate technical traces for use in the extension development
File 'Erlang.tmLanguage' is inspired from https://github.com/textmate/erlang.tmbundle/blob/master/Syntaxes/Erlang.plist