[Gambas-user] Debugging web applications directly from the IDE

Benoît Minisini gambas at ...1...
Sat Jul 27 19:32:50 CEST 2013


Hi,

Since revision #5765, it is possible to debug web applications directly 
from the IDE.

How does it work?

As soon as you have selected the 'gb.web' component in your project, a 
new debugging option is available in the 'Options' tab of the project 
property dialog: "Use an embedded HTTP server".

If you check this option, when you run your project from the IDE:

- Your project starts an embedded http server (the 'gb.httpd' component).

- Your project is run as a CGI script from the embedded http server 
through a new child process.

- A browser is automatically opened on http://localhost:8080 (the 
default port used by the embedded http server).

- Only one CGI script is run at a time. So if you set a breakpoint, the 
debugged process is the one that answer to the very first request. All 
other requests are stalled, and can even returns the 503 error code if 
you are too long to debug!

- If your project ends, it is started again to answer the next request, 
and is debugged the same way.

If you want to change the http port, use the GB_HTTPD_PORT environment 
variable.

All that is at a very early experimental stage, so expect lots of quirks 
(mainly because between the IDE and the debugged process stands the 
embedded HTTP server).

So I need your comments, tests and ideas about it!

Thanks in advance by those who are interested in that new feature.

Regards,

-- 
Benoît Minisini




More information about the User mailing list