debugging proxy.pac and adapter issues

Remember some time ago when I talked about the virtues of using a PAC file to configure proxy settings? It’s especially handy when you are moving between multiple networks. Well it suddenly stopped working for me!

At first, I wondered if something had changed on my institution’s network. So, I removed the proxy.pac file and tired accessing the web. Worked smoothly, so that couldn’t have been the issue. Which meant that my PAC file was misbehaving. But, it was working perfectly fine until yesterday, so … what gives?

It was time to debug the pac file. Now, I had not written the PAC file I’m using, but rather just modified it for my own use. Fortunately, the author had inserted these very helpful alert() messages throughout the file in case someone wanted to debug any problems. I turned on debugging and opened up my web-browser again.

No internet and no debug messages. I was feeling unhappy at this point – HOW was I supposed to debug the proxy.pac file if I can’t see the debug messages?!? And do the messages get printed anywhere at all?

Turns out, that those messages DO get printed out. The location depends on the browser I’m using. Easiest for me at the time was Firefox. The alert messages get printed to the Error Console. After you’ve got it enabled, just press Ctrl+Shift+J to see it.

With that know-how, tracing the problem was a simple matter. Turns out that for some weird reason, my web browsers were using a recently installed VirtualBox Host Network Adapter to connect to the internet. That returned a different IP than what I would be using on my institution’s network, resulting in misdirection for all my requests.

I didn’t need that adapter for my Virtual systems, so I disabled it. Problem solved ! šŸ™‚

Advertisements