How to debug your C # Program

Source: Internet
Author: User

How to debug your C # Program

Welcome to the wonderful sky of C #. Here, I hope you can get what you want ,. we sincerely hope to bring you great help and bring you into another broad space.

Come on. Follow me and then U can Win!

Similar to gdb in Gnu C ++ in Linux, C # provides a command line debugging program "Cordbg.exe ", through this program, you can easily debug your C # application. This article cannot completely introduce you to the function of cordbg below. I just hope that through the introduction in this article, you can get something. It is a pleasure for me to help you. Just talk nonsense!

Cordbd: Microsoft (R) Common Language Runtime Test Debugger Shell

I do not define this stuff for the time being. Let's take a look at it step by step:

My machine configuration: Win2K Professional + iis 5.0 + Microsoft. NET Framework SDK (Beta2)

Let's start a simple program:

Test-1.cs
/*
Data: 2001-12-13
Author: Longshan Culture
FileName: Test-1.cs
One Csharp Test Program
*/
Using System;
Class Test_1
{
Static void Main ()
{
String str;
Console. WriteLine ("Please Enter Your Name. Thanks! ");
Str = Console. ReadLine ();
Console. WriteLine ("------------------------------------");
Console. WriteLine ("Dear" + str + ", Welcome To Csharps World! ");
Console. WriteLine ("------------------------------------");
}
}

The above program is extremely simple, and I will use a complicated example for debugging in the subsequent articles. Let's start step by step!

But please note that I use "/*... ... */"To mark comments and descriptions of related texts.

Start-> Run-> Cmd, OK. Now a Dos window is opened to compile your C # program. (All the following input actions are a complete debugging process. Do not confuse the comments I added later. Also, determine the data that I input based on the color, and the data that is output by the computer)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.