The Developer Web Server (Cassini) only supports ASP.NET and static content.
You need an instance of IIS running on your dev machine.
Windows XP
On XP you need to modify the Default Web site so that either its home directory is pointing at your sites root folder or create a new virtual directory and configure it as an application. In either case you would want to set the application isolation to "High"
Hit your web site directly with a browser, then in VS 2008 use Debug->Attach to Process. You need to attach to a process with the name "DLLHOST.EXE". There will be more than one but most likely only one of them will contain the word "Script" in the Type column and thats the one you want. Make sure the "Attach to" box above the list of processes contains "Script".
Vista/Windows 7
Vista and Windows 7 will use IIS7 and that will allow you to create a new site if thats your preference. Make sure that the application has its own App Pool.
The procedure then is much the same except you are looking for W3WP.exe processes instead. If there are more than one that show "Script" in the type you can just attach to all of them.
With this in place you can set breakpoints, examine exceptions, and do all the normal stuff you could do with script debugging.