Solved

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

Posted on 2004-08-02
2
337 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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 will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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