Friday, September 26, 2008

Return of the Mac (How to squash Silverlight bugs on a Mac using Remote Debugging and Fiddler)


Occasionally, differences between the PC and Mac versions of the Silverlight runtime will crop up, and you'll notice that your code works fine on PCs, but has problems on a Mac. If this is the case, you'll need to remotely debug the problem from a PC with Visual Studio, or use Fiddler to scan network traffic.

Remote Debugging
1) First, you'll want to install the Silverlight Developer runtime for the Mac. This will install a Silverlight Debugging configuration tool – run it.




2) When you run this tool, it will setup your Mac to allow debugging via a specific port, allow you to specify a Remote Debugging password, and generate a ConfigurePCForSilverlightDebugging.exe file for you to run on your PC.
3) Copy that .exe file to your PC and run it.
4) Enter the password you entered on the Mac.



5) Your PC is now ready to debug remotely!
6) Now, launch Visual Studio, and select Debug -> Attach to Process.
7) Select "Silverlight Remote Cross-Platform Debugging" as the Transport.
8) Enter the network name of the Mac as the qualifier.
9) Finally, change the "Attach to" option to "Silverlight".



10) You now see all the processes running on the Mac, and you can attach to the one you want.
11) Optionally, you may want to install Remote Desktop for Mac so that you can use the Mac to terminal into your PC, attach the debugger, and then work in the browser from the Mac. This allows you to manage everything you need to do from one location.

Fiddler
Fiddler runs on the .NET Framework, and is generally only useable on PCs. However, you can route the network traffic from a Mac through a port on a PC in order to run a network trace against a Mac using Fiddler. To do so:
1) Open up Fiddler on your PC, and go to Tools -> Fiddler Options.
2) Check the box for "Allow remote computers to connect".



3) Next, on the Mac, go to System Preferences -> Network -> Advanced, and click the Proxies tab.
4) Use a proxy for Web/HTTP, and enter the network name of the PC on which you're running Fiddler. Enter Port 8888.




Now, when you go to a site on the Mac, the traffic should appear in Fiddler on your PC.

2 comments:

  1. The first period of structuring your postulation is to settle on the subject you will make about. You must have the ability to explore and research all around a topic that is of individual enthusiasm to you, so settle on an invigorating investigate point. Disregarding the way that the piece is trying perform, it must be compensating here write my essay.

    ReplyDelete
  2. That is most to associate honest degree the acknowledge that the YOU remuneration day Size credit stock and place on results will payday loan greatly profit accent aquatics. once you'll chase out non genetic with the YOU remuneration day Size credit item what's any results, the lion's share folks will clearly composed your current observe timetable to suit watch your.

    ReplyDelete

Note: Only a member of this blog may post a comment.