Parcourir la source

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 il y a 11 ans
Parent
révision
c5c794eaf4
2 fichiers modifiés avec 18 ajouts et 0 suppressions
  1. +13
    -0
      plugins/rebar_gdb_plugin.erl
  2. +5
    -0
      rebar.config

+ 13
- 0
plugins/rebar_gdb_plugin.erl Voir le fichier

@ -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 Voir le fichier

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

Chargement…
Annuler
Enregistrer