Modular Software - Home PicLan-IP - Home

Debugging Coyote Web Applications

Because of the nature of web development, debugging web applications is a bit different that debugging standard applications.  There are two primary differences between the web executions environment and a "normal" terminal execution environment:

What Debugging Services PicLan-IP Provides by Default

The default configuration for PicLan-IP is to run web server processes on phantom ports with a "supervisor" process watching them.  In this configuration you will get the following debugging information:

What you Should Do To Make Application Debugging Easier

There are a number of steps that you can take to make debugging web applications easier.

Debug on a Separate System

It is always easier to debug application no a web server that is not running live users.  While this may not always be practical, you should consider setting up your development environment in this manner if at all possible.

Shorten the PicLan-IP Web Server's Timeout Values

If you do not like to wait the 2 minutes for the supervisor process to timeout a hung process, change the timeout values to:
SUPERVISOR POLL=00:00:05
SUPERVISOR TIMEOUT=00:00:30
These settings assume that you system is fast enough to compile and run any active page in under 30 seconds.  If you system is not this fast (or your applications are this complicated), then you may need to use longer values.

Only Run a Single Web Server Process

It can get much less confusing if you only configure the PicLan-IP Web Server for a single helper process.

Clear the Web Server's Cache Poll

Some source code changes may not trigger the web server to re-compile your code.  For example, if you change only the contents of an INCLUDEd item, then the web server will not know that the mv/BASIC code needs to be recompiled.  You can tell the web server to recompile all mv/BASIC active content by typing the command:
CLEAR-CACHE

Setup Instrumented Compiles

If you specify the letter R in the HTTP DIR=... option settings, the PicLanIP Web Server will include instrumentation code in the generated code.  This allows the Web Server to produce much more detailed information to the browser if an application hangs including displaying the source code for the errant module and the last line that was to execute.

Using the R option during application development is highly recommended. You should remove the R option (and run a CLEAR-CACHE command) when you decide to deploy your live application.  The R option adds a considerable amount of code to your generated application code.  It's inclusion can easily make your application double in size and lower it's run-time performance by a factor of 20.

Use Source Level Debugging

You can debug many application logic issues by using the PL_PRINT ... statement to output messages to the PLIP-MONITOR console.  Be sure to take the statements out when you deploy the application in a production environment.

What to do if it Still Does Not Work

If you are having problems even getting started, you should try to manually run a single web server processes on a foreground process.  The procedure for doing this is: When you are running a single web server process in the foreground, there is no supervisor process to catch process hangs.  Also, timed item-locks will not work.  Use this technique with care, and only when others do not work.  It is possible that you will end up rebooting your host environment if you do not correctly exit the web server application because there is no supervisor process around to clean things up for you.

Modular Software - Home PicLan-IP - Home

© Copyright 1996-1998  Modular Software Corporation.All rights Reserved.