Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phoenix Server Not Starting #659

Closed
2 tasks done
sirfitzy opened this issue Jan 19, 2022 · 1 comment
Closed
2 tasks done

Phoenix Server Not Starting #659

sirfitzy opened this issue Jan 19, 2022 · 1 comment

Comments

@sirfitzy
Copy link

Issue

Phoenix servers fail to launch on VSCode.

Hi everyone, any help would be much appreciated :)

I created a brand new phoenix app (https://github.com/SirFitz/new_app) and tried running with the VSCode extension, but the application never launches.
It stalls in the image below, which contains my config:
Screenshot 2022-01-19 at 5 48 29 PM

All details about the environment are below

Environment

  • Elixir & Erlang versions (elixir --version): 1.12.3 (compiled with Erlang/OTP 24)
  • Operating system: macOS 12.1
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • Editor Plugin/LSP Client name: ElixirLS: Elixir support and debugger

Troubleshooting

  • Restart your editor (which will restart ElixirLS) sometimes fixes issues
  • Stop your editor, remove the entire .elixir_ls directory, then restart your editor
    • NOTE: This will cause you to have to re-run the dialyzer build for your project

If you're experiencing high CPU usage, it is most likely Dialyzer building the PLTs; after it's done the CPU usage should go back to normal. You could also disable Dialyzer in the settings.

  • Not experiencing high CPU Usage

Logs

  1. If using a client other than VS Code, please try VSCode's "ElixirLS: Elixir support and debugger" extension. Does it reproduce your failure?
  • I'm using ElixirLS: Elixir support and debugger v0.9.0
  1. Create a new Mix project with mix new empty, then open that project with VS Code and open an Elixir file. Is your issue reproducible on the empty project? If not, please publish a repo on Github that does reproduce it.
  1. Check the output log by opening View > Output and selecting "ElixirLS" in the dropdown. Please include any output that looks relevant. (If ElixirLS isn't in the dropdown, the server failed to launch.)
  • No relevant Output, ElixirLS isn't in the dropdown
  1. Check the developer console by opening Help > Toggle Developer Tools and include any errors that look relevant.
  • No relevant errors in the console

Screenshot 2022-01-19 at 5 46 48 PM

@lukaszsamson
Copy link
Collaborator

Cannot reproduce
Screenshot 2022-01-23 at 10 08 21

Most likely your launch config is invalid. Why are you starting apps? It's this is needed only for tests. Try with

{
      "type": "mix_task",
      "name": "phx.server",
      "request": "launch",
      "task": "phx.server",
      "projectDir": "${workspaceRoot}"
    }

lukaszsamson added a commit that referenced this issue Jan 23, 2022
Too many people end up with broken config, e.g.
#451
#659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants