[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Arachno with webrick apps - question

Its Me

2/5/2005 10:09:00 PM

I've been using the latest Arachno for a couple of weeks now and to me it
looks _very_ promising.

A question: if I have a web app under Webrick (or, separately, Apache), is
it possible to debug it? How specifically do I set breakpoints etc. prior to
something like:

app = Wee::Application.new { |app|
app.default_request_handler { Nemo::Examples::PersonEditor::Session.new }
app.id_generator = Wee::SimpleIdGenerator.new(rand(1_000_000))
}

Wee::WEBrickAdaptor.
register('/app' => app).
start(:Port => 2000) { |server|
server.mount('/', WEBrick::HTTPServlet::FileHandler, './')
}

Thanks.


1 Answer

llothar

2/6/2005 5:38:00 AM

0

"itsme213" <itsme213@hotmail.com> wrote in message news:<NtbNd.21174$uA.10598@fe1.texas.rr.com>...
> I've been using the latest Arachno for a couple of weeks now and to me it
> looks _very_ promising.
>
> A question: if I have a web app under Webrick (or, separately, Apache), is
> it possible to debug it? How specifically do I set breakpoints etc. prior to
> something like:

Have you tried the builtin apache. It is designed for normal cgi
scripts, maybe this also works in your case.

In the project settings you select "CGI Application" (on the Project
Tab)
With this an apache is automatically started when you open your
project. It takes a free port number on your system (which may change
during a session), so you must access it with arachno. The base
directory of your project becames the document root. A "Web" menu will
also be visible in the main menu bar, from there you can setup
different start urls for your cgi ruby scripts. The default URL target
always takes the current file in the editor and runs this.

As you see you have direct access to the apache config, error and
access logs and the proxy that caches transmitted response/request
messages. Of course you can set breakpoints as normal.

The easiest way to try this feature is to start a new project with the
CGI type. Create a file from the CGI template. Set a breakpoint inside
this file and then choose the "Start URL with Debugger".

It is also possible to do remote debugging if you want to start the
debugger from an independent application. Needs some lines of code and
good documentation. Maybe i find some time to write this down.

If you have any questions, please ask in this thread again. I'm at the
moment on vacation and some internet shops here in thailand have huge
problems connecting to my email web frontend. But groups.google.com
work fine.