How to debug your C # program

xiaoxiao2021-03-06  80

Author: Longshan Culture Source: ASPCool.com

Welcome to the wonderful sky of C #, here, I hope you can get what you want to get, we sincerely hope to bring you a huge help, take you into another vast space.

Come on. Follow me and then u CAN WIN!

Similar to GDB in the GNU C tool under Linux, C # provides a command line debugger "Cordbg.exe", you can easily debug your C # app through this program, this article is impossible to completely give You introduce the function of Cordbg, I just hope that I can get some things through this article. Can help you, a very happy thing for me. Still or less!

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

I don't define this stuff, let's take a step in 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 * / Use System; Class Test_1 {Static Void Main () {String Str; Console.writeline ("please enter your name. Thanks!"); Str = console.readline (); console.writeline ("------------------ ------------ / r / n "); Console.Writeline (" Dear " Str ", Welcome to Csharp's World! / R / N "); console.writeline (" - ------------------------------- / r / n ");}}

The above program is extremely simple, and I will use a more complex example to debug in a subsequent article. Let's start now!

However, please note that I use "/ * ... ... * /" to mark the description of the comment and some related texts.

Start -> Run -> cmd, ok, now open a DOS window, compile your C # program. (All the input movements below are a whole debugging process, please do not confuse me to add a comment. And please determine the data I entered according to the color, those are the data outputted by the computer)

转载请注明原文地址:https://www.9cbs.com/read-98538.html

New Post(0)