ideprize

ideprize

Debugger Type incorrect

New to Elixir, new to vs code but not coding. I am trying to get the debugger in vs code working with Elixir. I have installed the extension ElixirLS version v0.17.1 and I am able to write code and execute from the integrated terminal provided by vs code. When I try to run and debug in the vs code window it complains about the “type: elixir”, command in the launch.json file stating that it is not a supported type? According to chatGPT what I have should “fly” but it doesn’t. Please see below the complete launch.json

{
“version”: “0.2.0”,
“configurations”: [
{
“name”: “Elixir Debug”,
“type”: “elixir”,
“request”: “launch”,
“program”: “${c:/Users/Gordon/servy}/lib/servy.ex”,
“cwd”: “${c:/Users/Gordon/servy}”,
“args”: ,
“runtimeArgs”: [
“–sname”,
“debug@localhost”
],
“console”: “integratedTerminal”,
“stopOnEntry”: false,
“internalConsoleOptions”: “neverOpen”
}
]
}

Any insight provided will be greatly appreciated.

Respectfully,
Ideprize

First Post!

a-maze-d

a-maze-d

Not quite the same as what you might be looking for, but the following works for me

"configurations": [
  {
    "type": "mix_task",
    "name": "mix (Default task)",
    "request": "launch",
    "projectDir": "${workspaceRoot}"
  },
  [...]

Note this will launch your default application, for that you should create an application.ex that looks something like this (give the name you like and make the call to the function that starts your application:

defmodule MyApp.Application do
  def start(_type, _args) do
    MyApp.start()
    {:ok, self()}
  end
end

and register your Application in your mix.exs under (use the same name you used above):

def application do
  [
    extra_applications: [:logger],
    mod: {MyApp.Application, []}
  ]
end

Where Next?

Popular in Questions Top

dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
makeitrein
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project. Baby step #1 is extracting the number ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
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
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
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

We're in Beta

About us Mission Statement