FYI: If you're debugging with Chrome, there is a way to dynamically reload the PAC file, as well as see alerts.
The magic URL is:
chrome://net-internals/#proxy
From there, you can reload the PAC file.
There's a "capture" tab where you can reset the list of events.
There's an "events" tab that shows you all the events. Any alert() call from you PAC will show up as an event.