Git Product home page Git Product logo

cedb's Introduction

cedb

Console Erlang Debugger.

Run debug directly from console.

Run debug

Go inside the example app and run the shell:

cd examples/test
rebar3 shell
1> application:ensure_all_started(cedb).
2> % Set a breakpoint in `test.erl` module in line `16`
2> cedb:break(test, 16).
3> % Set a breakpoint in `test.erl` module `function2` with arity `1`
3> cedb:break(test, function2, 1).
4> % run the application to debug
4> test:start().

=> {<0.258.0>,{attached,test,16,false}}

File /projects/cedb/examples/test/_build/default/lib/test/src/test.erl

   11:       function1(),
   12:       io:format("Finish~n").
   13:
   14:     function1() ->
  *15:       A = "Hello",
   16:       B = #{A => <<"c">>},
   17:       function2(B),
   18:       io:format("I'm in function 1~n").
   19:
   20:     function2(C) ->
   21:       io:format("I'm in function 2, the value is ~p~n", [C]),

cedb> next.
ok
=> {<0.258.0>,running}

File /projects/cedb/examples/test/_build/default/lib/test/src/test.erl

   11:       function1(),
   12:       io:format("Finish~n").
   13:
   14:     function1() ->
   15:       A = "Hello",
  *16:       B = #{A => <<"c">>},
   17:       function2(B),
   18:       io:format("I'm in function 1~n").
   19:
   20:     function2(C) ->
   21:       io:format("I'm in function 2, the value is ~p~n", [C]),

cedb> A.
"Hello"
cedb> n.
ok
=> {<0.258.0>,running}
cedb>

Commands

You can run the current commands when the debugger is running:

Command Description
backtrace Show backtrace.
bindings Show binded variables.
continue Continue the execution of the process.
finish Finish the debug session.
messages Show process messages.
next Execute next instruction.
skip Skip.
step Step inside next instruction.
stop Stop debugging.
timeout Timeout.
Var Variable names are evaluated in the current context.

Abbreviations of the above commands are also accepted, like n for next, ba for backtrace etc.

Breakpoints

Command Description
cedb:break(test, 16). Add a breakpoint to line 16.
cedb:break(test, function2, 1). Add a breakpoint to function function2.

cedb's People

Contributors

hachreak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.