Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README markdown syntax highlighting #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,38 @@ This module parses erlang header files, and imports any constants as `@` attribu

app/include/app_header.hrl:

-define(CONSTANT_FROM_APP,5)
```erlang
-define(CONSTANT_FROM_APP,5)
```

lib/mymodule.ex:

defmodule MyModule
require Quaff.Constants
Quaff.Constants.include_lib("app/include/app_header.hrl")

def myfunc() do
@_CONSTANT_FROM_APP + 10
end
end
```elixir
defmodule MyModule
require Quaff.Constants
Quaff.Constants.include_lib("app/include/app_header.hrl")

def myfunc() do
@_CONSTANT_FROM_APP + 10
end
end
```

Quaff.Debug
-----------

The Debug module provides a simple helper interface for running Elixir code in the erlang graphical debugger, using the technique I described in [this posting](http://qhool.github.io/elixir/2014/02/06/elixir-debug.html).


Interactive Elixir (0.12.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Quaff.Debug.start() #start the graphical debugger
{:ok, #PID<0.59.0>}
iex(2)> Quaff.Debug.load("./lib/mymodule.ex") #load all modules in source file
lib/mymodule.ex:1: redefining module My.Module
lib/mymodule.ex:212: redefining module My.OtherModule
[module: My.Module, module: My.OtherModule]
iex(3)> Quaff.Debug.load(Yet.AnotherModule) #load a module by name
{:module, Yet.AnotherModule}
```elixir
Interactive Elixir (0.12.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Quaff.Debug.start() #start the graphical debugger
{:ok, #PID<0.59.0>}
iex(2)> Quaff.Debug.load("./lib/mymodule.ex") #load all modules in source file
lib/mymodule.ex:1: redefining module My.Module
lib/mymodule.ex:212: redefining module My.OtherModule
[module: My.Module, module: My.OtherModule]
iex(3)> Quaff.Debug.load(Yet.AnotherModule) #load a module by name
{:module, Yet.AnotherModule}
```

Also provided is `nload(module)` (equivalent to `load(module, all_nodes: true)`), which debugs the module[s] on all known nodes.