Procházet zdrojové kódy

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 před 11 roky
rodič
revize
c5c794eaf4
2 změnil soubory, kde provedl 18 přidání a 0 odebrání
  1. +13
    -0
      plugins/rebar_gdb_plugin.erl
  2. +5
    -0
      rebar.config

+ 13
- 0
plugins/rebar_gdb_plugin.erl Zobrazit soubor

@ -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 Zobrazit soubor

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

Načítá se…
Zrušit
Uložit