Emily

Emily

Elixir Snippet Compiler / Debugger For Visual Studio Code?

I’m just starting out with Elixir in Visual Studio, coming from Python using PyCharm to develop.

In PyCharm there was a 1 click compiler & debugger. So far I can’t find anything like that for Elixir for Visual Studio?

Am I missing something?

If you’re debugging in Visual Studio how are you compiling/debugging code snippets?

Most Liked

imetallica

imetallica

You mean Visual Studio Code?

There is no integration. If you are using a Mix project, a simple mix compile on the command line should do the trick. Then to run your application, a simple iex -S mix should load an Elixir shell and your application, so you can do commands from there.

gon782

gon782

This will be an unpopular opinion to some, I’m sure, but I’m of the opinion that classic “step debugging” is largely useless in BEAM applications. The problems you encounter will more often than not have something to do with how you’ve laid out your actual process infrastructure.

What step debugging means for execution in processes is that you’ll be holding up a process live system, so it in fact doesn’t help for the actually important issues you’ll be investigating, as they’ll probably show up mostly under load where several processes need to interact. Obviously, if you freeze a process that might need to interact with other processes and as such won’t be responding to requests from elsewhere, you’re now actually the one breaking the system and your debugging has caused effects far beyond what a normal bug could.

It’s something akin to how you can’t determine the spin of an atom (?) without stopping it, thus actually influencing it.

There are other, better ways of debugging, like tracing, that will actually intercept messages between processes and give you information about the state changes in those processes.

If you’re not referring to debugging in the sense previously mentioned, could you please clarify what it is you mean?

Emily

Emily

Anyone know of a Visual Studio Code extension that will compile the current open Elixir window without having to type out the compile command each time?

NobbZ

NobbZ

I do not know about such a plugin. But you could use eye_drops to have a compile on save. Or anything similar. Guard from the ruby world will do as well but might be hard to integrate correctly.

OvermindDL1

OvermindDL1

If VSCode can take Atom plugins (wasn’t there a plugin for VSCode that lets you run a bulk set of Atom plugins?), all I do in Atom is hit save (Ctrl+s), that will then compile the file, run credo over it, and a few other things, with all errors and warnings appearing in the linter view that pops up at the bottom if there are any issues. :slight_smile:

Where Next?

Popular in Questions Top

yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
Kagamiiiii
Student & New to elixir. Nice language. I want to convert a english character, e.g. “a”, which is stored in a variable, to it’s asci...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

We're in Beta

About us Mission Statement