How to debug erlang

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to debug erlang

Eckard Brauer
Hello all,

another beginner question: Is there any good description of how to
debug Erlang applications? My current problem is cowboy on a Raspberry
Pi - even the hello_erlang from the guide doesn't process requests, but
I'd rather like to learn how debugging is possible at a more general
level.

Thanks in advance,
Eckard

--
Wir haften nicht für die korrekte Funktion der in dieser eMail
enthaltenen Viren. We are not liable for correct function of the
viruses in this email! :)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: How to debug erlang

Oliver Korpilla
Are you aware of https://www.erlang-in-anger.com/ ?

Might be worth a look.

Oliver

Gesendet: Mittwoch, 19. Juni 2019 um 16:24 Uhr
Von: "Eckard Brauer" <[hidden email]>
An: [hidden email]
Betreff: [erlang-questions] How to debug erlang
Hello all,

another beginner question: Is there any good description of how to
debug Erlang applications? My current problem is cowboy on a Raspberry
Pi - even the hello_erlang from the guide doesn't process requests, but
I'd rather like to learn how debugging is possible at a more general
level.

Thanks in advance,
Eckard

--
Wir haften nicht für die korrekte Funktion der in dieser eMail
enthaltenen Viren. We are not liable for correct function of the
viruses in this email! :)
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions[http://erlang.org/mailman/listinfo/erlang-questions]
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: How to debug erlang

Garrett Smith-5
In reply to this post by Eckard Brauer
I suggest getting into the habit of using tracing. It's one of
Erlang's game changing features.

In a pinch, print to stdout. But once you become proficient at
tracing, it's very fast.

I've been doing a lot Python programming lately (machine learning) and
miss the ability to observe a program without a) modifying it or b)
tediously stepping through code.

I haven't use this but based on the author I already know it's excellent :)

https://ferd.github.io/recon/recon_trace.html

Perhaps there are others folks can recommend. I personally found the
built-in dbg interface quite complex and wrote something for e2.

Garrett


On Wed, Jun 19, 2019 at 9:25 AM Eckard Brauer <[hidden email]> wrote:

>
> Hello all,
>
> another beginner question: Is there any good description of how to
> debug Erlang applications? My current problem is cowboy on a Raspberry
> Pi - even the hello_erlang from the guide doesn't process requests, but
> I'd rather like to learn how debugging is possible at a more general
> level.
>
> Thanks in advance,
> Eckard
>
> --
> Wir haften nicht für die korrekte Funktion der in dieser eMail
> enthaltenen Viren. We are not liable for correct function of the
> viruses in this email! :)
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: How to debug erlang

Eckard Brauer
Hello Oliver and Garret,

thank you for the helpful hints - indeed, I already found "Erlang in
anger", but didn't read it at the time - so I simply didn't remember.
The recon_trace I will definitely have a look on.

One more question: I believe to remember that I read at any occasion of
a possibility to create a backtrace from within a code snippet, but
didn't try it aut extensively at that moment, so I forgot about. Do you
have one more hint for that - or did I mix up things with any other
language?

Eckard

Am Wed, 19 Jun 2019 09:57:19 -0500
schrieb Garrett Smith <[hidden email]>:

> I suggest getting into the habit of using tracing. It's one of
> Erlang's game changing features.
>
> In a pinch, print to stdout. But once you become proficient at
> tracing, it's very fast.
>
> I've been doing a lot Python programming lately (machine learning) and
> miss the ability to observe a program without a) modifying it or b)
> tediously stepping through code.
>
> I haven't use this but based on the author I already know it's
> excellent :)
>
> https://ferd.github.io/recon/recon_trace.html
>
> Perhaps there are others folks can recommend. I personally found the
> built-in dbg interface quite complex and wrote something for e2.
>
> Garrett
>
>
> On Wed, Jun 19, 2019 at 9:25 AM Eckard Brauer <[hidden email]>
> wrote: [...]



--
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: How to debug erlang

Schneider-3
In reply to this post by Garrett Smith-5
Chapter 17 in Erlang Programming by Francesco Cesarini and Simon Thompson gives a good introduction. However, Erlang debugging and tracing does require quite some understanding of the system before you can use it effectively. It is hugely effective if you know what you’re doing, so read the book first, which dates back some ten years but is still well worth reading.
Another very useful tool is the observer. Start with observer:start() from the Erlang shell.
The other tool to use as a beginner is the GUI debugger. Start from the Erlang shell with debugger:start(). See the Erlang docs for it’s use. This is probably more inline with the tools you’re used to.

Frans

> Op 19 jun. 2019 om 16:57 heeft Garrett Smith <[hidden email]> het volgende geschreven:
>
> I suggest getting into the habit of using tracing. It's one of
> Erlang's game changing features.
>
> In a pinch, print to stdout. But once you become proficient at
> tracing, it's very fast.
>
> I've been doing a lot Python programming lately (machine learning) and
> miss the ability to observe a program without a) modifying it or b)
> tediously stepping through code.
>
> I haven't use this but based on the author I already know it's excellent :)
>
> https://ferd.github.io/recon/recon_trace.html
>
> Perhaps there are others folks can recommend. I personally found the
> built-in dbg interface quite complex and wrote something for e2.
>
> Garrett
>
>
>> On Wed, Jun 19, 2019 at 9:25 AM Eckard Brauer <[hidden email]> wrote:
>>
>> Hello all,
>>
>> another beginner question: Is there any good description of how to
>> debug Erlang applications? My current problem is cowboy on a Raspberry
>> Pi - even the hello_erlang from the guide doesn't process requests, but
>> I'd rather like to learn how debugging is possible at a more general
>> level.
>>
>> Thanks in advance,
>> Eckard
>>
>> --
>> Wir haften nicht für die korrekte Funktion der in dieser eMail
>> enthaltenen Viren. We are not liable for correct function of the
>> viruses in this email! :)
>> _______________________________________________
>> erlang-questions mailing list
>> [hidden email]
>> http://erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions