Paw*_*rok 63
您需要在iex会话中开始测试 - 您可以通过运行来完成iex -S mix test.然后你可以IEx.pry在测试中使用:
require IEx
test "the truth" do
one = 1
IEx.pry
assert one + one == 2
end
Run Code Online (Sandbox Code Playgroud)
系统会询问您是否允许窥探会话:
Request to pry #PID<0.143.0> at test/test_app_test.exs:7. Allow? [Yn]
Run Code Online (Sandbox Code Playgroud)
此时的所有背景都可供您使用:
pry(1)> one
1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5332 次 |
| 最近记录: |