Để debug code, dùng methods/properties của Debug Class. Debugger Class dùng để giao tiếp với debugger.
Debug Class
Kế thừa System.Diagnostics. Syntax: public static class Debug
| STT | Property & Mô tả |
|---|---|
| 1 | AutoFlush - Flush Listeners tự động |
| 2 | IndentLevel - Mức thụt lề |
| 3 | IndentSize - Số space trong indent |
| 4 | Listeners - Collection listeners |
Debugger Class
Cũng kế thừa System.Diagnostics, enable communication với debugger, không thể inherit. Syntax: public sealed class Debugger
Chỉ có 1 property:
| STT | Property & Mô tả |
|---|---|
| 1 | IsAttached - Debugger có attach vào process không |