Is it possible to test a Proxy auto-config (PAC) script by manually executing the FindProxyForURL(url, host) function from the browser JavaScript console?
Can the internal implementation of the PAC functions (such as dnsDomainIs, shExpMatch, isInNet) be accessed from the console?
Alternatively can these functions be implemented within standard JavaScript to allow the FindProxyForURL function to be executed manually?
The only way I can find to debug the proxy.pac script within the browser is to add alert() statements and let the browser execute it internally. Being able to add breakpoints and manually step through the FindProxyForURL function would make debugging it easier.
There are many external tools for testing PAC scripts, such as pacparser (which uses Spidermonkey) and autoprox (which uses Microsofts implementation)
Similar questions have been asked:
How to discover de proxy used in a pac
How to get access log of PAC(proxy auto config)
Debugging autoproxy (PAC) javascript with alert()?
Where in Windows is the Javascript file which contains functions for executing PAC files?