From: Steve V. <vi...@ie...> - 2012-02-17 20:42:50
|
Glad to hear it's working. The easiest way to build everything with debug might be to use make, since there you can just say make debug which basically adds -Ddebug +debug_info to the Erlang compiler (and also builds the C code with -g). To be able to run make, you first have to autoconf ./configure make debug Our rebar support is still not as capable as our make support, but we're getting there. The make support has had a 10 year head-start. :-) Another way to see what's going on would be to use dbg tracing. Takes a bit to learn, but personally I find dbg to be far more useful than the debugger for most Erlang debugging. Chapter 17 of Francesco's and Simon's "Erlang Programming" book is a good way to learn it. --steve On Fri, Feb 17, 2012 at 3:13 PM, George Stoianov <gst...@gm...> wrote: > On 02/17/2012 08:42 PM, Steve Vinoski wrote: > > On Fri, Feb 17, 2012 at 1:52 PM, George Stoianov <gst...@gm...> > wrote: > > Hi guys, > > I just cloned the git repo and I am trying to run the websocket example > and I get this > > =ERROR REPORT==== 17-Feb-2012::19:47:38 === > Error in process <0.103.0> with exit value: > {undef,[{basic_echo_callback,handle_message,[{text,<<16 > bytes>>}]},{lists,map,2},{yaws_websockets,loop,4}]} > > Typically when you see an "undef" error like this, it means that the > module or function in question doesn't exist or hasn't been loaded. > > If you're running yaws -i, try hitting enter and you should see an > Erlang shell prompt. At that prompt type > > code:which(basic_echo_callback). > > and hit enter. Make sure you include the period at the end. If that > module is available, it will tell you its file system pathname. But if > it's not found, you'll get the response non_existing. > > It looks like the rebar build isn't compiling this module, which we'll > have to fix. If you want to compile it by hand, you can go into the > examples/src directory and type > > erlc -I../../include -o ../../ebin *.erl > > and get both modules built. Their compiled beam files will go into the > top-level ebin directory. Things should then work better. > > --steve > > Thanks Steve, > > I noticed right after I send my email that ebin did not contain that file so > I compiled it, moved it and restarted, bingo it works. > Could not figure out what I have to change to rebar.config to make it > compile the example. > > Thanks for the prompt response and for working on Yaws. I am new at Erlang, > but from all the things I have read I like it and yaws is really nice > for the moment I only serve small stuff like photos etc.. but I would like > to learn more about how it works under the hood. Is there a way I can > specify a flag so all artifacts are build with debug_info and I can look at > things with the debugger?? > > Thanks, > George > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Erlyaws-list mailing list > Erl...@li... > https://lists.sourceforge.net/lists/listinfo/erlyaws-list > |