DebugTrace 3.0.0
dotnet add package DebugTrace --version 3.0.0
NuGet\Install-Package DebugTrace -Version 3.0.0
<PackageReference Include="DebugTrace" Version="3.0.0" />
paket add DebugTrace --version 3.0.0
#r "nuget: DebugTrace, 3.0.0"
// Install DebugTrace as a Cake Addin #addin nuget:?package=DebugTrace&version=3.0.0 // Install DebugTrace as a Cake Tool #tool nuget:?package=DebugTrace&version=3.0.0
DebugTrace-net
DebugTrace-net is a library that outputs trace logs when debugging .NET programs. It based on .NET 6.
1. Features
- Automatically outputs invoker's class name, method name, source file name and line number.
- Automatically indents the log with nesting methods and objects.
- Automatically breaks at the output of values.
- Automatically output logs when changing threads.
- Uses reflection to output objects of classes that do not implement
ToString
method. - You can customize the output content in
DebugTrace.properties
. - There are no dependent libraries at run time if you output to the console.
- You can use the following logging library.
2. Install
Search DebugTrace
packege on NuGet and install it.
If you output logs using log4net or NLog,
install DebugTrace.Log4net
or DebugTrace.NLog
package.
3. How to use
Do the following for debug target and related methods.
- Insert
Trace.Enter()
at the beginning of methods. - Insert
Trace.Leave()
at the end of methods or just before thereturn
statements. - Insert
Trace.Print("foo", foo)
to output arguments, local variables and return value to the log if necessary.
8. License
9. Release Notes
DebugTrace-net 3.0.0 - June 23, 2024
- Support for .NET 6.0 has been added.
- Dropped support for Visual Basic.
- The method for specifying
using
has been changed.
using static DebugTrace.CSharp;
↓
using DebugTrace;
Print
methods now returns the value or the message of the argument.- Changed the default values of the following properties in DebugTrace.properties.
Property Name | New Default Value | Old Default Value |
---|---|---|
MinimumOutputCount | 128 | 5 |
MinimumOutputLength | 256 | 5 |
CollectionLimit | 128 | 512 |
StringLimit | 256 | 8192 |
Related packages:
DebugTrace Package | Related Package |
---|---|
DebugTrace.Log4net 3.0.0 | log4net 2.0.17 |
DebugTrace.NLog 3.0.0 | NLog 5.3.2 |
<div align="center" style="color:#6699EE">(C) 2018 Masato Kokubo</div>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on DebugTrace:
Package | Downloads |
---|---|
DebugTrace.NLog
Bridge library that uses NLog for DebugTrace-net output. |
|
DebugTrace.Log4net
Bridge library that uses log4net for DebugTrace-net output. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0 | 171 | 6/23/2024 |
2.1.0 | 702 | 11/13/2022 |
2.0.3 | 425 | 8/13/2021 |
2.0.2 | 655 | 7/12/2020 |
2.0.1 | 518 | 5/16/2020 |
2.0.0 | 786 | 4/26/2020 |
1.6.1 | 725 | 3/30/2019 |
1.6.0 | 672 | 3/24/2019 |
1.5.4 | 736 | 2/9/2019 |
1.5.3 | 741 | 2/2/2019 |
1.5.2 | 722 | 1/28/2019 |
1.5.1 | 753 | 12/15/2018 |
1.5.0 | 1,015 | 10/28/2018 |
1.4.4 | 802 | 10/20/2018 |
1.4.3 | 855 | 10/13/2018 |
1.4.2 | 903 | 8/23/2018 |
1.4.1 | 1,047 | 7/12/2018 |
1.4.0 | 940 | 6/9/2018 |
1.3.0 | 1,134 | 5/26/2018 |
1.2.0 | 1,051 | 5/19/2018 |
1.1.1 | 1,042 | 4/24/2018 |
1.1.0 | 1,088 | 4/23/2018 |
1.0.1 | 1,102 | 4/15/2018 |
1.0.0 | 1,059 | 4/8/2018 |
0.6.3-beta | 871 | 4/2/2018 |
0.6.2-beta | 970 | 3/21/2018 |
0.6.1-beta | 853 | 3/19/2018 |
0.6.0-beta | 879 | 3/18/2018 |
0.5.1-beta | 912 | 3/6/2018 |
0.5.0-beta | 964 | 3/5/2018 |
0.4.0-beta | 881 | 3/3/2018 |
0.3.0-beta | 881 | 3/3/2018 |
0.2.0-beta | 899 | 2/28/2018 |
0.1.1-beta | 844 | 2/26/2018 |
0.1.0-beta | 850 | 2/24/2018 |
* Support for .NET 6.0 has been added.
* Dropped support for Visual Basic.
* The method for specifying `using` has been changed.
`using static DebugTrace.CSharp;`
↓
`using DebugTrace;`
* `Print` methods now returns the value or the message of the argument.
* Changed the default values of the following properties in DebugTrace.properties.
- MinimumOutputCount
- MinimumOutputLength
- CollectionLimit
- StringLimit