Pārlūkot izejas kodu

Allow the use of GDB/LLDB for debugging

If the environment variable USE_GDB exists this plugin will pause
before the EUNIT tests so that you can attach a debugger to the VM.
pull/65/head
Paul J. Davis pirms 11 gadiem
vecāks
revīzija
c5c794eaf4
2 mainītis faili ar 18 papildinājumiem un 0 dzēšanām
  1. +13
    -0
      plugins/rebar_gdb_plugin.erl
  2. +5
    -0
      rebar.config

+ 13
- 0
plugins/rebar_gdb_plugin.erl Parādīt failu

@ -0,0 +1,13 @@
-module(rebar_gdb_plugin).
-compile(export_all).
pre_eunit(_Config, _AppFile) ->
case os:getenv("USE_GDB") of
false ->
ok;
_ ->
Prompt = io_lib:format("GDB Attach to: ~s~n", [os:getpid()]),
io:get_line(Prompt)
end,
ok.

+ 5
- 0
rebar.config Parādīt failu

@ -32,3 +32,8 @@
eunit_surefire, [{dir,"."}]
}}
]}.
{plugins, [
rebar_gdb_plugin
]}.

Notiek ielāde…
Atcelt
Saglabāt