Is there a Phoenix equivalent to Rails Console

前端 未结 3 1280
无人及你
无人及你 2021-01-31 07:04

I\'m just learning Phoenix and Elixir and I\'m coming from Ruby/Rails where I work in the REPL using pry to inspect my database and application state.

I\'m

3条回答
  •  被撕碎了的回忆
    2021-01-31 07:22

    For runtime debug, (like byebug or debugger or pry in rails), use

    require IEx at the top of your model or controller or views file, then type

    IEx.pry to wherever you need it to halt at runtime and continue debugging.

    Type h for help inside the console

    Most importantly, after all that, restart your server with:

    iex -S mix phoenix.server

    More info: here

提交回复
热议问题