Debugging a SmartArrays .NET Program

The data portions of SmartArrays objects are outside the managed .NET memory region, so special techniques are needed to inspect these objects as you are debugging.  The SDK provides several techiques to let you see arrays while debugging:

DebugString Property of an SmArray

Each instance of class SmArray has a property DebugString that displays as the result of toDebugString().  This gives you the ability to see the type, shape, and first few items of an array from within the QuickWatch window.  This techinique is especially important when debugging server applications such as web services, where you cannot use the show() method to display an array. 

 

Expressions in the QuickWatch Window

Within the debug window it is also possible call any SmArray method, allowing an array to be inspected with calls like getInt() or  getStrings().