Debuggins strings > 255 characters 
Author Message
 Debuggins strings > 255 characters

When debugging string variables (CString or char *),
I can't see more than the first 255 characters. Is
there a way around this? In my own code it's easy to
make some extra debug variable, extracting some
portion of the string. But when calling MFC
functions, and wanting to find out where and why my
string (SQL statement) gets messed up, I have a
problem. Can anyone help me?

BTW, the actual problem is a disappearing bracket
'{' in a m_strFilter variable. It's missing in the
final SQL statement.

/Glenn



Sun, 10 Feb 2002 03:00:00 GMT  
 Debuggins strings > 255 characters
expand the CString variable in the debug view and make a copy the m_pchData
member variable. Nect modify the m_pchData to &m_pchdata[250] and you will
be able to see the next 255 or so characters.

James.

Quote:

>When debugging string variables (CString or char *),
>I can't see more than the first 255 characters. Is
>there a way around this? In my own code it's easy to
>make some extra debug variable, extracting some
>portion of the string. But when calling MFC
>functions, and wanting to find out where and why my
>string (SQL statement) gets messed up, I have a
>problem. Can anyone help me?

>BTW, the actual problem is a disappearing bracket
>'{' in a m_strFilter variable. It's missing in the
>final SQL statement.

>/Glenn



Sun, 10 Feb 2002 03:00:00 GMT  
 Debuggins strings > 255 characters
You could consider using the "View Memory" window.  You do this by capturing
the address of your string variable (as outlined in the previous response),
then pasting the address into the window.

This window docks, scrolls and shows memory updates in a different color.
It also shows you data past the trailing '\0' - which is very useful for a
"post mortem" view of your strings.

mjh

Quote:

>When debugging string variables (CString or char *),
>I can't see more than the first 255 characters. Is....



Sun, 10 Feb 2002 03:00:00 GMT  
 Debuggins strings > 255 characters
Thank you very much, you solved my problem.
/Glenn
Quote:

> When debugging string variables (CString or char *),
> I can't see more than the first 255 characters. Is
> there a way around this? In my own code it's easy to
> make some extra debug variable, extracting some
> portion of the string. But when calling MFC
> functions, and wanting to find out where and why my
> string (SQL statement) gets messed up, I have a
> problem. Can anyone help me?

> BTW, the actual problem is a disappearing bracket
> '{' in a m_strFilter variable. It's missing in the
> final SQL statement.

> /Glenn



Mon, 11 Feb 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Is there way to call SNMP API with 255.255.255.255

2. Is there way to call SNMP API with 255.255.255.255

3. Is there way to call SNMP API with 255.255.255.255

4. CRecordset: Acess memo field limited to 255 characters?

5. display ascii characters 0 to 255

6. 255 characters limit in debug information.

7. Can not display text longer than 255 characters in the CListCtrl (VC++ 6.0)

8. change a number (between 0 to 255) to character

9. More than 255 characters into a Word formfield using Visual C++

10. STL and identifiers truncated to 255 characters for debug

11. VC++ and 255 character names in Debug build

12. Passing parameter with size >255 chars to sqlserver 6.5

 

 
Powered by phpBB® Forum Software