How to get the yaws debug info?

View: New views
5 Messages — Rating Filter:   Alert me  

How to get the yaws debug info?

by Eric Liang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I'm trying some web frameworks, Erlyweb, Erlang-web and Nitrogen till
now.  Do jobs like this are usually not in smooth waters, and then debug
is necessary. But this time, I found couldn't get the yaws' debug info.

I've tried run yaws by --debug flag, and even modify the yaws.app file(
set the debug env variable), both did not work. :( .  The log files in
/var/log/yaws are still *.access/auth.log/report.log/trace.http, no
other debug output file. I check the content of these files, it looks
like there are no debug info in them. So my question is: how can I get
the yaws' debug output? Did I missed something?

As a newbie in web development, I'm curious how to debug yaws itself,
would you mind tell me something about that? Also, any other suggestions
will be appreciated. Thanks in advance.

Eric




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

signature.asc (268 bytes) Download Attachment

Re: How to get the yaws debug info?

by Steve Vinoski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sat, Nov 7, 2009 at 11:34 AM, Eric Liang <eric.l.2046@...> wrote:
Hi all,
I'm trying some web frameworks, Erlyweb, Erlang-web and Nitrogen till
now.  Do jobs like this are usually not in smooth waters, and then debug
is necessary. But this time, I found couldn't get the yaws' debug info.

I've tried run yaws by --debug flag, and even modify the yaws.app file(
set the debug env variable), both did not work. :( .  The log files in
/var/log/yaws are still *.access/auth.log/report.log/trace.http, no
other debug output file. I check the content of these files, it looks
like there are no debug info in them. So my question is: how can I get
the yaws' debug output? Did I missed something?

How about

yaws --interactive --tracetraf --traceout --tracehttp --debug

This runs yaws interactively and shows all kinds of debug and trace info right on stdout.
 
As a newbie in web development, I'm curious how to debug yaws itself,
would you mind tell me something about that? Also, any other suggestions
will be appreciated. Thanks in advance.

Why do you feel you need to debug yaws? Are you seeing problems with it? I assume you want to debug your own code running under yaws, not yaws itself.

For the ultimate in debugging, learn about the Erlang dbg module. If you have Francesco's and Simon's "Erlang Programming" O'Reilly book <http://oreilly.com/catalog/9780596518189>, read chapter 17 thoroughly, and then read it again. (If you don't have the book, get it.) Try every example and do every exercise at the end of the chapter. I've never run a debugger on any Erlang code I've written, ever, because with the dbg module and tracing, I've never needed a traditional debugger.

--steve

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Re: How to get the yaws debug info?

by Eric Liang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Vinoski wrote:


On Sat, Nov 7, 2009 at 11:34 AM, Eric Liang <eric.l.2046@...> wrote:
Hi all,
I'm trying some web frameworks, Erlyweb, Erlang-web and Nitrogen till
now.  Do jobs like this are usually not in smooth waters, and then debug
is necessary. But this time, I found couldn't get the yaws' debug info.

I've tried run yaws by --debug flag, and even modify the yaws.app file(
set the debug env variable), both did not work. :( .  The log files in
/var/log/yaws are still *.access/auth.log/report.log/trace.http, no
other debug output file. I check the content of these files, it looks
like there are no debug info in them. So my question is: how can I get
the yaws' debug output? Did I missed something?

How about

yaws --interactive --tracetraf --traceout --tracehttp --debug

This runs yaws interactively and shows all kinds of debug and trace info right on stdout.
Thanks Steve.

Actually, I have tried this command,  the debug output is only some PROGRESS REPORTs, but I need more about the program.  The specific case is:
some of my yaws configurations do not work, so I decide to get in yaws to see what happened. The source of yaws looks like use a macro ?Debug which call the functions yaws_debug:assert ->yaws_debug:fail ->io:format, so I guess it will print these information to some place like stdout. but I can't get them from file( no log) or interactive output( the command you suggested ) ? 

 
As a newbie in web development, I'm curious how to debug yaws itself,
would you mind tell me something about that? Also, any other suggestions
will be appreciated. Thanks in advance.

Why do you feel you need to debug yaws? Are you seeing problems with it? I assume you want to debug your own code running under yaws, not yaws itself.
So as I mentioned before, I guess maybe there is another way to turn on the ?Debug output, which I need to learn about, or the --debug flag does not work.


For the ultimate in debugging, learn about the Erlang dbg module. If you have Francesco's and Simon's "Erlang Programming" O'Reilly book <http://oreilly.com/catalog/9780596518189>, read chapter 17 thoroughly, and then read it again. (If you don't have the book, get it.) Try every example and do every exercise at the end of the chapter. I've never run a debugger on any Erlang code I've written, ever, because with the dbg module and tracing, I've never needed a traditional debugger.

--steve
Thanks your recommendation of the book, I've read Joe Armstrong's "Programming Erlang",  some body reminded me of this book, I thought do some practices is more important than just read another book for me. However, maybe this book is readable, I will try to get one later.

Thanks in advance for any more suggestions.

Eric

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

signature.asc (268 bytes) Download Attachment

Re: How to get the yaws debug info?

by Steve Vinoski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sat, Nov 7, 2009 at 11:21 PM, Eric Liang <eric.l.2046@...> wrote:
Steve Vinoski wrote:


On Sat, Nov 7, 2009 at 11:34 AM, Eric Liang <eric.l.2046@...> wrote:
Hi all,
I'm trying some web frameworks, Erlyweb, Erlang-web and Nitrogen till
now.  Do jobs like this are usually not in smooth waters, and then debug
is necessary. But this time, I found couldn't get the yaws' debug info.

I've tried run yaws by --debug flag, and even modify the yaws.app file(
set the debug env variable), both did not work. :( .  The log files in
/var/log/yaws are still *.access/auth.log/report.log/trace.http, no
other debug output file. I check the content of these files, it looks
like there are no debug info in them. So my question is: how can I get
the yaws' debug output? Did I missed something?

How about

yaws --interactive --tracetraf --traceout --tracehttp --debug

This runs yaws interactively and shows all kinds of debug and trace info right on stdout.
Thanks Steve.

Actually, I have tried this command,  the debug output is only some PROGRESS REPORTs, but I need more about the program.  The specific case is:
some of my yaws configurations do not work, so I decide to get in yaws to see what happened. The source of yaws looks like use a macro ?Debug which call the functions yaws_debug:assert ->yaws_debug:fail ->io:format, so I guess it will print these information to some place like stdout. but I can't get them from file( no log) or interactive output( the command you suggested ) ? 

Those macros have to be compiled in. Build your code like this:

make TYPE=debug

Install the result and run with the command line I gave you above.

If you keep having problems, don't hesitate to ask for help with your code on this list.

--steve

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

Re: How to get the yaws debug info?

by Eric Liang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steve Vinoski wrote:


On Sat, Nov 7, 2009 at 11:21 PM, Eric Liang <eric.l.2046@...> wrote:
Steve Vinoski wrote:


On Sat, Nov 7, 2009 at 11:34 AM, Eric Liang <eric.l.2046@...> wrote:
Hi all,
I'm trying some web frameworks, Erlyweb, Erlang-web and Nitrogen till
now.  Do jobs like this are usually not in smooth waters, and then debug
is necessary. But this time, I found couldn't get the yaws' debug info.

I've tried run yaws by --debug flag, and even modify the yaws.app file(
set the debug env variable), both did not work. :( .  The log files in
/var/log/yaws are still *.access/auth.log/report.log/trace.http, no
other debug output file. I check the content of these files, it looks
like there are no debug info in them. So my question is: how can I get
the yaws' debug output? Did I missed something?

How about

yaws --interactive --tracetraf --traceout --tracehttp --debug

This runs yaws interactively and shows all kinds of debug and trace info right on stdout.
Thanks Steve.

Actually, I have tried this command,  the debug output is only some PROGRESS REPORTs, but I need more about the program.  The specific case is:
some of my yaws configurations do not work, so I decide to get in yaws to see what happened. The source of yaws looks like use a macro ?Debug which call the functions yaws_debug:assert ->yaws_debug:fail ->io:format, so I guess it will print these information to some place like stdout. but I can't get them from file( no log) or interactive output( the command you suggested ) ? 

Those macros have to be compiled in. Build your code like this:

make TYPE=debug

Install the result and run with the command line I gave you above.

If you keep having problems, don't hesitate to ask for help with your code on this list.

--steve
Thanks a lot. This is exactly what I want.  :)

Eric


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list

signature.asc (268 bytes) Download Attachment