⬆️ ⬇️

Silverlight on Mac OS X: Debugging

As you know, Silverlight is a cross-platform (Win, Mac) and cross-browser (IE, Safari, Firefox) technology.



However, as is often the case, on different platforms Silverlight behaves slightly differently ( proof ).



As a result, the application running on the win-platform without any problems starts to behave a bit strange in MacOS. There is a famous question.

')

- What to do?



- What-what, debazhit! What else?



For the test, I suggest a simple Silverlight application: poking a button - the version of your OS is shown.



Sample work on Windows 7







An example of working on Mac OS X







On the win-platform, debugging has never been a problem (Visual Studio). And how to debug under the poppy? It turns out - this is real. Despite the fact that usual remote debugging is not possible under a poppy, the Silverlight SDK for Mac has an interesting crutch for setting up remote debugging.



So, what is he like.

After installing the Silverlight SDK for Mac , you will have one program in the Applications folder.







It shows you a window in which "multi-book".







If it is inconvenient or lazy to read from the picture, I will briefly retell it - the setup program will create you an .exe file, which you should copy to the machine with installed Visual Studio (hereinafter VS2010 is used). This file contains a TCP port through which the remote debug will go, as well as a password that must be entered on the developer's machine to confirm that you are not a camel.



After running this .exe file and entering the correct password, the secret debugging protocol will open in the Tools-> Attach to Process menu in Visual Studio. Entering the IP of the experimental Mac, we get a list of all its processes.







I already choked when I saw it for the first time, it was so unusual for me to observe in the list of processes such unexpected guests as Finder or iTunes . In Visual Studio, cross-platform debugging of Silverlight code is fully available, which is very pleasing.



Well, you can hook up to our Mac and use all the facilities of the studio debugger.







Now, nothing prevents you from finding all platform-specific glitches. :)



The most basic advice for teams starting a real cross-platform project using Silverlight - the sooner testing and debugging starts on all target platforms, the better.



Ps . As far as I understand, in the world of Mono with Moonlight debugging everything is very sad, that is, there is no debugger at all. Correct if I'm wrong.



PS2 . The article contains an arrogant product placement of a company in which I recently work. Guess which one?

Source: https://habr.com/ru/post/91538/



All Articles