If you’ve read the section on Hyper in the Terse Guide to the GLASS Tools, then you realize that you have to go through a hoop or two to debug your Seaside application in GLASS. With 3 gems serving Seaside pages in the appliance, any one of the gems can get a walkback while processing a request.
Until today, we didn’t have a good story for remote debugging.
Last night, I was mulling over the different approaches that we could take for doing remote debugging. As I thought about it, I realized that when the ‘Debug’ link is pressed in a Seaside, it wouldn’t be hard to snap off a continuation and stash it in a persistent collection and then in a development vm (one with Squeak attached), the continuation can be activated in a debugger.
Persistent continuations are used throughout GLASS, so it isn’t a big stretch to use them for remote debugging.
I spent a couple of hours this afternoon on an initial implementation. The end result at this point is somewhat crude, but functional.
If you want to give the remote debugger a try, just load up the package GLASS-dkh.83.mcz. Then head over to http://glass/seaside/tests/alltests in your browser:
- Click on the Error tab
- Click on the ‘Raise zero divide’ link
- Click on the ‘Remote Debug’ link on the walkback page.
- Follow the instructions on the page for bringing up the debugger in your development image.
You can save code in the debugger, set breakpoints and step around. There are a couple of problems with proceed, so unless you’ve set a breakpoint that prevents flying off the end of the stack, you shouldn’t use proceed. By implication there are certain points in a stack that you can’t step over. Don’t press the ‘Halt Execution’ link, because the halt is not caught by the remote debugger. These problems and a cleaner interface will be taken care of as we move forward.[Updated 4/10/2009: Halts have been safely caught for about a year now:)].
Finally, the remote debugging code won’t interfere with the the interactive debugging as described in the Terse Guide to the GLASS Tools.
4 comments
Comments feed for this article
February 21, 2008 at 4:37 pm
GLASS Beta Update: GLASS-dkh.88 « (gem)Stone Soup
[…] getting happier with the remote debugging factility – the steps for debugging are greatly simplified and I’ve even replaced the Hyper […]
March 16, 2009 at 2:26 pm
Terse Guide to the (new) GLASS Tools « (gem)Stone Soup
[…] Debug… Menu allows you to select a continuation to debug. see Remote Seaside Debugging with Persistent Continuations for information on initiating a Remote Debugging […]
April 15, 2009 at 3:22 pm
GLASS Beta Update: Working with SOAP (Preview) « (gem)Stone Soup
[…] as a server. For Seaside applications we’ve arranged for continuations to be used for the remote debugging of application […]
December 2, 2011 at 10:24 am
GLASS 101: Remote Breakpoints for Seaside 3.0 « (gem)Stone Soup
[…] been available in GLASS, for a long time now. In 2008 I added remote breakpoints for Seaside2.8 and finally with the release of Seaside 3.0.6.3, remote breakpoints are available for Seaside […]