The Watches function worked good on previous configuration I had - Ubuntu 10.04 with C::B 10.05 installed from a ppa, and wxWidgets 2.8.11. Now I installed Ubuntu 10.10, with C::B from repository, and wxWidgets 2.9.1, and when I debug a project I wrote in previous configuration, the variables in Watches window are somehow nested. For example, on a code snippet like bellow:
case SQLITE_ROW:
{
const char *txt = (const char*)sqlite3_column_text(stmt, 0);
wxString NrContract(txt, wxConvUTF8);
this->InsertItem(i, NrContract);
txt = (const char*)sqlite3_column_text(stmt, 1);
wxString Nume(txt, wxConvUTF8);
this->SetItem(i, 1, Nume);
wxString dataScadenta = GetDataScadentaPrelungire(NrContract);
this->SetItem(i, 2, dataScadenta);
wxString valoareEvaluata = GetValoareEvaluata(NrContract);
this->SetItem(i, 3, valoareEvaluata);
wxString restPlata = GetRestPlata(NrContract);
this->SetItem(i, 4, restPlata);
wxString status = GetContractAtribut(wxT("Status"), NrContract);
wxDateTime dataScadentaD;
dataScadentaD.ParseFormat(dataScadenta, wxT("%d-%m-%Y"));
wxDateTime now = wxDateTime::Now();
wxTimeSpan timpRamas = dataScadentaD - now;
I get Watches like in the following image http://imgur.com/BVJSk (http://imgur.com/BVJSk). The program runs ok, but I don't have any idea about the Watches issue. Thanks in advance for any tips.
The "local variables" don't support script evaluation, so this is normal behavior.
If you want to see "wxvar = "string"", you should explicitly add the variable.
Thanks for response, but I might have been a bit ambiguous in my formulation. The code above is a fragment from a class method, which is invoked at runtime, and in previous configuration Watch values were displayed correctly (each variable with it's own values). Even if I use "Add watch" for the variable I want, the result is the same.
It seems the problem was due to wxWidgets 2.9.1. I rolled back to 2.8.11, as 2.9.1 wasn't a priority for me, and now it works again as expected.
Hm, yes they've modified wxString in wx2.9+, so the value parser in C::B should be updated.