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

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement