Code Monkey home page Code Monkey logo

vscode_erlang's Introduction

Erlang for Visual Studio Code

This extension adds support for the Erlang language to Visual Studio Code, including editing, building and debugging.

Editing support

  • 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

editing

Build

build

  • 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)

build

Debugger

  • 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

debug

Running debugger

You can provide a specific command line to 'erl' in launch.json configuration file in "arguments" entry.

debug1

The modified code may be automatically build before debugger is started. To set automatic build up you need to:

  1. Add to launch.json file the entry "preLaunchTask": "rebar3 compile"
  2. Select Configure Task in the alert, choose Create tasks.json file from template and then Others: Example to run an arbitrary command
  3. This will create tasks.json for you. Change both label and command to "rebar3 compile".
  4. Add entry "problemMatcher": "$erlang"

debug

Then, before debugging is started, modified files will be recompiled automatically.

Using this extension in Erlang Docker instance

Clone this repo, and try it :

For more informaiton about vscode and containers :

Available commands

Support for Erlang tools, including rebar3, EUnit and Dialyzer

commands

  • Dialyzer warnings displayed in Problems tab for easy navigation

Settings

  • erlang.erlangPath - Directory location of erl/escript
  • erlang.rebarPath - Directory location of rebar/rebar3
  • erlang.rebarBuildArgs - Arguments to provide to rebar/rebar3 build command
  • erlang.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 enough
  • erlang.linting - Enable/disable dynamic validation of opened Erlang source files
  • erlang.codeLensEnabled - Enable/Disable CodeLens
  • erlang.verbose - Activate technical traces for use in the extension development

Help

Some configuration tricks

Credits

File 'Erlang.tmLanguage' is inspired from https://github.com/textmate/erlang.tmbundle/blob/master/Syntaxes/Erlang.plist

vscode_erlang's People

Contributors

pgourlain avatar wojteksurowka avatar shuying2244 avatar kornelh avatar nigelrook avatar vladdu avatar dependabot[bot] avatar andrewsumskoy avatar dziaineka avatar filmor avatar chi-lambda avatar danielfinke avatar eboutin avatar hypro999 avatar jparise avatar pierrick-btl avatar saleyn avatar yozhig avatar shian avatar zsoci avatar sebkm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.