Skip to content

Commit

Permalink
0.6.1 Fixes a display bug in the term view where brackets were in the
Browse files Browse the repository at this point in the history
wrong order.
  • Loading branch information
Andy Till committed May 18, 2015
1 parent beed433 commit 20c2856
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[![Join the chat at https://gitter.im/andytill/erlyberly](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/andytill/erlyberly?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

erlyberly is a debugger for erlang, and [elixir](https://twitter.com/andy_till/status/539566833515626497). Instead of setting break points in code, a trace is set on a function and calls to it are logged without blocking your processes.
erlyberly is a debugger for erlang, and [elixir](https://twitter.com/andy_till/status/539566833515626497). Traces are applied to functions and calls to it are logged without blocking your processes.

If you are using `io:format/2` or lager for debugging then erlyberly can save you time. There is no recompliation and no log statements need to be removed (or not!) afterwards.
If you are using `io:format/2` or lager for debugging then erlyberly can save you time. There are no code changes and no recompliation required to see function calls.

### Features and How To

Expand All @@ -15,6 +15,8 @@ All the modules loaded by the VM appear in the module tree. Expand one of modul

![you cannot see the beautiful screen shot](doc/erlyberly.png)

Right click on a module and then click **Module Trace** to put a trace on all functions displayed under the module. If some functions are not displayed because of a filter, the trace will not be applied.

##### See calls to functions and their results

Double click on a trace to see a breakdown of the arguments and results of the function call.
Expand Down Expand Up @@ -85,10 +87,6 @@ Open up the process table, next to the memory usage columns there is a pie chart

![you cannot see the beautiful screen shot](doc/heap-pie.png)

##### See the state of a process

Right click on a process in the process table and click on *"Get process state"*. This is possible only if the process handles system messages, OTP behaviours do.

##### Cross platform

Tested on Ubuntu and Windows 7/8. Also seen on [OS X](http://t.co/kzXppo5GEt).
Expand Down Expand Up @@ -138,9 +136,15 @@ You'll also need the [floaty-field](https://github.com/andytill/floaty-field) li

Some things that are important.

1. Bug fixing and stability for current features is number one priority right now. Help by contributing issue reports.
2. seq_trace visualisation with graphs.
3. More statistics on the running system, such as memory and CPU.
4. Beat CAP.
1. Bug fixing and stability for current features is number one priority right now. Help by contributing issue reports.
2. seq_trace support.
3. Beat CAP.

erlyberly is meant to be a complementary to observer so there will be no attempt to implement features such as the supervisor hierarchy graph.

### Special Thanks

The following people have contributed code to erlyberly:

erlyberly is meant to be a complementary to observer so there will be no attempt to implement features such as the supervisor hierarchy graph.
+ [@aboroska](https://github.com/aboroska)
+ [@ruanpienaar](https://github.com/ruanpienaar)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>andytill</groupId>
<artifactId>erlyberly</artifactId>
<version>0.5.5</version>
<version>0.6.1</version>
<packaging>jar</packaging>

<name>erlyberly</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/erlyberly/DbgView.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ private void toggleTraceModFunc(ModFunc function) {
}

private void toggleTraceMod(ObservableList<TreeItem<ModFunc>> functions){
for (TreeItem func : functions) {
for (TreeItem<ModFunc> func : functions) {
if(!func.getValue().toString().equals("module_info/0") &&
!func.getValue().toString().equals("module_info/1")){
ModFunc function = (ModFunc) func.getValue();
Expand Down
24 changes: 15 additions & 9 deletions src/main/java/erlyberly/TermTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ else if(isRecordField(obj)) {

OtpErlangObject value = OtpUtil.tupleElement(2, obj);
if(OtpUtil.isLittleTerm(value))
tupleItem.setValue(value);
tupleItem.setValue(otpObjectToString(value));
else
addToTreeItem(tupleItem, value);

Expand All @@ -74,17 +74,18 @@ else if(isRecordField(obj)) {
tupleItem.setExpanded(true);

if(OtpUtil.isLittleTerm(obj)) {
tupleItem.setValue(obj);
tupleItem.setValue(otpObjectToString(obj));
parent.getChildren().add(tupleItem);
}
else {
tupleItem.setValue("{");
for (OtpErlangObject e : elements) {
addToTreeItem(tupleItem, e);
}
parent.getChildren().add(tupleItem);
parent.getChildren().add(new TreeItem("}"));
}

parent.getChildren().add(tupleItem);
}
}
}
Expand All @@ -102,26 +103,31 @@ else if(obj instanceof OtpErlangList) {


if(OtpUtil.isLittleTerm(obj)) {
listItem.setValue(obj);
listItem.setValue(otpObjectToString(obj));
parent.getChildren().add(listItem);
}
else {
listItem.setValue("[");
for (OtpErlangObject e : elements) {
addToTreeItem(listItem, e);
}
parent.getChildren().add(listItem);
parent.getChildren().add(new TreeItem("]"));
}

parent.getChildren().add(listItem);
}
}
else {
StringBuilder stringBuilder = new StringBuilder();
OtpUtil.otpObjectToString(obj, stringBuilder);
parent.getChildren().add(new TreeItem(stringBuilder.toString()));
parent.getChildren().add(new TreeItem(otpObjectToString(obj)));
}
}

private String otpObjectToString(OtpErlangObject obj) {
StringBuilder stringBuilder = new StringBuilder();
OtpUtil.otpObjectToString(obj, stringBuilder);
String string = stringBuilder.toString();
return string;
}

private Label recordLabel(String recordNameText) {
Label label;
label = new Label(recordNameText);
Expand Down

0 comments on commit 20c2856

Please sign in to comment.