how to see wxString vaule in watch window

Discussion in 'Mac Programming' started by ychaturvedi, Jun 10, 2011.

  1. ychaturvedi macrumors newbie

    May 23, 2011

    I am working on Mac-10.6 and xcode as IDE and using wxWidgests , i am unable to see wxString under mouse point as i see integer value , this will show me string address and i am unable to see string lie on that address , i put this string varibale in watch window also but unable to its value, i have to use wxMessageBox to see string value that is not good for debugging.

    Is there any trick to see wxString value under mouse position.

  2. jiminaus, Jun 10, 2011
    Last edited: Jun 10, 2011

    jiminaus macrumors 65816


    Dec 16, 2010
    No, XCode is not designed for wxWidgets. It doesn't know what a wxString is, so it just shows the pointer value.

    EDIT: You could output the value to into the XCode 3 debugger console or XCode 4 debug area with something like this (assuming str is a wxString).
    printf("%s:%d: str=%s\n", __PRETTY_FUNCTION__, __LINE__, (const char *)str.utf8_str());

Share This Page