Downloads will be available under the Downloads Tab. You can get the newest version always from the Source Code.


XapSpyAnalysis is deviced into two parts. You need to Download Behrangs XapSyp from here and need to extract it to a folder on your computer. After unpacking, you will notice a subfolder called XDEMonitor. The content of this folder needs to be rewritten with the code from my XDEMonitor version. This will enable the export to a CSV formatted Text file in the correct format for XapSpyAnalysis.

XapSpyAnalysis can just be extracted to any folder. You can run it with the .exe.


First, you need to use XapSpy. You need to start XapSpy and select a XAP package you want to analyse. It will be unpacked, stripped from its licence information, patched, signed and repacked. The next step is to launch the Emulator. This is automatically done from XapSpy. After it is booted, the application will get deployed to the emulator. After this is completed, XapSpy will inform you, that you can run the Monitor from inside XapSpy. This is where XDEMonitor kicks in. It will log all method calls and its variables it can get from the emulator log window. When you are finished, you can stop the recording and save the file to your harddisk.

This file can be loaded into XapSpyAnalysis. It will parse the file and display its raw content in the first tab. You can now switch between different views. You can display a table that contains all method calls with their variables, the DLL file from where the method call originates and its time. The next tab lists all method names and their number of calls. The next tab lists statistic values like how many method calls were registered and how many of them were unique method calls.

The final tab displays a graphical analyis of the method calls. The x axis displays the point of time, when the method was called. The y axis displays the number of method that was called. This is an unfortunate restriction from the used graphic framework. You can find a legend on the right side of the diagram. It maps the numbers to method names. But you can also point your mouse cursor on any of the data points in the diagram. A tooltip will be availabe that shows you the corresponding method name.


This screenshot shows an application, that crashes three times. You can see this from the data points starting with method 0 (InitializeComponent) and method 22 (Application_UnhandledException).

This screenshot shows an application that is properly executed and closed. It starts with method 0 (InitializeComponent) and calls a camera chooser (which is why method 0 is again called). This is a good example to see how Windows Phone 7 Multitasking and tombstoning works, because you can see when the methods Application_Deactivated and Application_Activated are used.


Issues & known Bugs

Right now XapSpyAnalysis is only in a basic form. I still have some ideas that needs to be implemented and I am always open to new suggestions. You can use the Issue Tracker to file new Bugs. Right now I am aware of the following limitations and issues:

  • You can only open one file per application run. If you want to change your file, you need to close and reopen XapSpyAnalysis. This is because I still need to figure out how to reset the graph without loosing all its elements.
  • Method calls can only be measured in seconds. This means you will have sometimes several methods that seem to be executed simultaneously. This is because XapSpys Log only allows method calls to log in seconds. We would need miliseconds to be more precise.
  • The Variables name and value column in the "Raw Data" Tab are empty. They are reserved for future versions. Right now, I can keep track of every call variable of a method and its value. However there is often a completely different count of method variables. These should ideally be displayed together with the tooltip information of every data point in the graph, however I still have no easy solution to handle this often changing variable counts. However you can see variables and their values in the variables column. They are seperated by , so it should be easy to separate them again.

Last edited Oct 11, 2011 at 6:36 AM by rudelm, version 4


No comments yet.