Follow these steps to build and debug your Tcl scripts:
Create a .tcl file containing a Tcl script in the directory specified by the Library parameter (see page 26) for your server. Include a call to ns_register_proc to register your script to an URL or URL hierarchy.
Test your script by accessing an URL that it is registered for. For example, if you registered the hello script to the /example/hello URL as follows:
ns_register_proc GET /example/hello hello
Then you would test the script by visiting the URL http://yourserver/example/hello.
After testing your script, you may want to make changes to it. Edit the script file and open the URL associated with the script (such as the /example/hello URL in the above example) again in your browser and perform a Reload to see the new results.