Debugging with MSVC

Watch and Variable Information

When debugging with Microsoft Visual C++ the auto expand keywords will provide better Watch and Variable information for common ClanLib types.

Add the following to autoexp.dat (located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger on my computer):

ClanLib 3.0

[AutoExpand] ; from ClanLib clan::Rect =top=<top> bottom=<bottom> left=<left> right=<right> clan::Rectf =top=<top> bottom=<bottom> left=<left> right=<right> clan::Point =x=<x> y=<y> clan::Pointf =x=<x> y=<y> clan::Size =width=<width> height=<height> clan::Sizef =width=<width> height=<height> clan::Vec4<float> =x=<x> y=<y> z=<z> w=<w> clan::Vec3<float> =x=<x> y=<y> z=<z> clan::Vec2<float> =x=<x> y=<y>

ClanLib 2.3

[AutoExpand] ; from ClanLib CL_SharedPtr<*> =<ptr> CL_WeakPtr<*> =<ptr> CL_UnknownPtr =<ptr> CL_BasicString<char,CL_String8Traits,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > =<data_ptr,s> length=<data_length> CL_BasicString<unsigned short,CL_String16Traits,std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> > > =<data_ptr,su> length=<data_length> CL_BasicString<wchar_t,CL_String16Traits,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > =<data_ptr,su> length=<data_length> CL_Rect =top=<top> bottom=<bottom> left=<left> right=<right> CL_Rectf =top=<top> bottom=<bottom> left=<left> right=<right> CL_Point =x=<x> y=<y> CL_Pointf =x=<x> y=<y> CL_Size =width=<width> height=<height> CL_Sizef =width=<width> height=<height> CL_Vector =x=<x> y=<y> z=<z> w=<w> CL_Vector2 =x=<x> y=<y> CL_Color =<color,x>

Disable stepping into ClanLib classes

It is also possible to disable that it steps into certain commonly used classes.

Locate the nodes in registry under

[HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\NativeDE\StepOver]

If you are on a 64bit Windows, you find the nodes under the Wow6432Node:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\NativeDE\StepOver]

Depending on your Visual Studio version, you might have different version than 10.

Change the registry as follows:

ClanLib 2.3

"ClanLib BasicString"=".*CL_BasicString.*=NoStepInto" "ClanLib String"=".*CL_String.*=NoStepInto" "ClanLib SharedPtr"=".*CL_SharedPtr.*=NoStepInto" "ClanLib WeakPtr"=".*CL_WeakPtr.*=NoStepInto" "ClanLib UnknownPtr"=".*CL_UnknownPtr.*=NoStepInto"