Преглед на файлове

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 преди 11 години
родител
ревизия
c5c794eaf4
променени са 2 файла, в които са добавени 18 реда и са изтрити 0 реда
  1. +13
    -0
      plugins/rebar_gdb_plugin.erl
  2. +5
    -0
      rebar.config

+ 13
- 0
plugins/rebar_gdb_plugin.erl Целия файл

@ -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 Целия файл

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

Зареждане…
Отказ
Запис