अपने Code को Debug करने के लिए, आपको Methods या Properties की आवश्यकता होती है, जो C# में Debug Class द्वारा Provide की जाती हैं।
Debugger Class का उपयोग Debugger के साथ Communication Set करने के लिए किया जाता है।
Debug Class
Debug Class System.Diagnostics से Inherit करती है। Syntax है:
public static class Debug
Debugger Class की निम्न Properties हैं।
| Sr.No | Property & Description |
|---|---|
| 1 | AutoFlush Value Get या Set करता है जो बताता है कि Flush को Listeners पर Call किया जाना चाहिए या नहीं। |
| 2 | IndentLevel Indent Level Set होता है |
| 3 | IndentSize Indent में Spaces की संख्या |
| 4 | Listeners Listeners का Collection Get करता है |
Debugger Class
Debugger Class भी System.Diagnostics से Inherit करती है लेकिन यह Debugger के साथ Communication Enable करती है और इसे Inherit नहीं किया जा सकता।
निम्न Syntax है:
public sealed class Debugger
इसमें केवल एक Property है।
| Sr.No | Property & Description |
|---|---|
| 1 | IsAttached Indicates करता है कि Debugger Process से Attached है या नहीं। |