Debugging QuantLib::Array in msvc

Posted by Kim Kuen Tang on
URL: http://quantlib.414.s1.nabble.com/Debugging-QuantLib-Array-in-msvc-tp7565.html

Hi all,

as we know debugging QuantLib::Array is not supported in msvc (2008 and
2009). The debugger just displays the name, the scoped_array and the size:
v {data_={...} n_=5 } QuantLib::Array
+ data_ {px=0x00295830 } boost::scoped_array<double>
                n_ 5 unsigned int

This is of course not human-friendly. And you can get around this
limitation by modifying the autoexp.dat file which can be found in

        %VSINSTALLDIR%\Common7\Packages\Debugger\autoexp.dat.
You just need to add these lines

;-------------------------------------
; QuantLib::Array
;------------------------------------

QuantLib::Array {
        preview
     (
         #(
        "[",
             $e.n_ ,
         "](",

         #array
         (
                expr: ((($c).data_).px)[$i],
                size : $c.n_
                        ),
                ")"
                )
        )

     children (
         #(
             [raw members]: [$c,!],
             [size]: [$c.n_, i],
             #array (
                 expr: ((($c).data_).px)[$i],
                 size: $c.n_
             )
         )
     )
}
.. Then you are able to get the information, the same as from std::vector:

+m[5](100.00000000000000,100.00000000000000,100.00000000000000,100.00000000000000,100.00000000000000)QuantLib::Array.

Back up autoesp.dat before proceeding.
Best regards,
Kim Tang



------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users