Change the Registry setting “HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main” and Create a new DWORD key under Main with the name “ShowScriptErrors“. Set dword value of 1
There are (at least) two ways to change registry settings on a Windows Mobile device/emulator. Firstly you can use the Remote Registry Editor (Start|Microsoft Visual Studio 2005|Visual Studio Remote Tools) that comes with Visual Studio. Alternatively you can install a registry editing application on the device, for example PHM Registry Editor.
One thing you can do is leverage XMLHttpRequest (XHR) to log messages to a remote server, sometimes useful when you need to log more information than will easily fit in an alert() dialog box on a cramped Windows Mobile display.