phoenixframework / phoenix_live_reload

Provides live-reload functionality for Phoenix
MIT License
317 stars 90 forks source link

Live reload not working in debug mode #85

Closed schlumpfling42 closed 6 years ago

schlumpfling42 commented 6 years ago

When I start the server in debug mode (I use VSCode with the Elixir plugin) or start the debugger in an iex sesstion, and change an .eex file, I get the following error: == Compilation error in file lib/simpleApp_web/views/page_view.ex == ** (CompileError) lib/simpleApp_web/views/page_view.ex:2: module SimpleAppWeb is not loaded and could not be found (elixir) expanding macro: Kernel.use/2 lib/simpleApp_web/views/page_view.ex:2: SimpleAppWeb.PageView (module) (elixir) lib/kernel/parallel_compiler.ex:206: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6 I just created a new phoenix app using mix. Starting without the debugger works fine. Environment: Windows 10 Erlang/OTP 20 [erts-9.2] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:10] Elixir 1.7.2 (compiled with Erlang/OTP 19) cowboy 1.1.2 cowlib 1.0.2 file_system 0.2.6 gettext 0.15.0 linguist 0.1.5 mime 1.3.0 phoenix 1.3.4 phoenix_html 2.12.0 phoenix_live_reload 1.1.5 phoenix_pubsub 1.1.0 plug 1.6.2 ranch 1.3.2 poison 3.1.0

How can I fix the problem?

chrismccord commented 6 years ago

What is "debug mode" and "the debugger" in the context of this issue? Is it something the VS code plugin provides, or are you using the Erlang :debugger, or something else? Thanks!

schlumpfling42 commented 6 years ago

One way to reproduce is to run 'iex -S Mix phx.server' and then calling ':debugger.start()'

schlumpfling42 commented 6 years ago

I just retried it and I cannot reproduce it. There is something else that needs to happen. I'll investigate and post steps to reproduce as soon as possible.

schlumpfling42 commented 6 years ago

Closing the issue, the reloading behaves differently when using iex and the VS Code debugger, but I think that's no a reloader issue.