Solved

How to get string "\r\n" converted to real CR LF while in debug mode?

Posted on 2004-08-02
2
334 Views
Last Modified: 2012-08-14
I'm using Visual Studio C#. For readability, I often build strings which contain ... \r \n \t \" ... for things like dynamic JavaScripts, dynamic TSQL, dynamic street address blocks, etc. But when I'm programming, I sometimes want to stop in debug mode, look at the IDE's LOCALS or AUTO tab and "see" what the final string looks like. Unfortunately, the string is shown with \r\n or \t.

Does anyone know an IDE "TRICK" for gettting a fully rendered string with ALL replacements complete ... while stopped in debug mode?

Thanks
Frederick
0
Comment
Question by:volking
2 Comments
 
LVL 12

Accepted Solution

by:
vascov earned 500 total points
ID: 11699283
There's a very easy way actually.

Use the Immediate window of VS.NET (Ctrl+Alt+I), and then just use some code lines:

Console.WriteLine( someString )
System.Diagnostics.Debug.WriteLine( someString )
System.Windows.Forms.MessageBox.Show( someString )

hth

Vasco
0
 
LVL 5

Author Comment

by:volking
ID: 11704055
vascov ... works GREAT!
Thanks ...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now