When a 'z' just doesn't cut it... (Oren Nachman's random notes from Microsoft)

June, 2010

  • Randomisation

    Debugging Silverlight in Firefox 3.6.4 (and newer)


    While they chug along to Firefox 4, Mozilla just released Firefox 3.6.4 (and quickly followed up with 3.6.6) on the world, sporting a new feature - plugin isolation. By isolating plugins to a different process, Firefox catches up to Chrome in stability, by ensuring that a rogue plugin that crashes does not bring down the whole browser, instead you get the sad face informing you that something has happened. This is a great end-user feature which will increase the general reliability of a user's browsing experience - but we aren't just users, are we?

    Firefox will shut down a plugin when it is deemed to be either dead, or frozen. Unfortunately frozen is the state that the plugin will enter when you try to debug it (say, through Visual Studio), causing Firefox to kill the plugin and continue on its merry way. There have a been a number of proposed solutions, mainly around disabling the plugin container for Silverlight (see this forum post). Unfortunately, while this works for debugging, this is not a real user situation that you are debugging (since you're no longer locked in the container, which is the expected state for any user running your app). In order to get Firefox to still run Silverlight in the container, but not kill it when it detects a Freeze, do the following:

    1. type about:config
    2. find dom.ipc.plugins.timeoutSecs (you can start typing it in the filter)
    3. change the value to -1

    This effectively cancels the timeout so that even though the plugin is no longer responding to Firefox's NSAPI messages, it will not be killed.

    Happy bug hunting!

  • Randomisation

    Windows Phone System Tray obscures FrameRate counters


    Here's a small tip for those of you who want to debug performance in a Windows Phone Silverlight app with the frame rate counters, but have the System Tray visible - hide it.

    The counters currently show up behind the system tray (since technically the tray is a system overlay which is drawing over the surface available to your Silverlight app), so hiding the tray will show the counters.

    Don't forget: to re-enable the system tray when you're done!

  • Randomisation

    Profile Silverlight 4 from the VS 2010 UI (Premium & Ultimate only)


    Maxim has a great post detailing a workaround which allows you to get some profiling functionality from the Visual Studio 2010 UI, without restoring to the fun that is the command line profiler interface.

    Check it out.

Page 1 of 1 (3 items)