11000+款5星资源

8.5万+用户参与评分

10万+社区成员鼎力支持

每款资源都经过 Unity 审核

首页
工具
实用工具
1/7
Enhance the Debug class with numerous improvements that can greatly improve readability of the Console view and save a lot of time by enabling more compact debugging code to be used.
可编程渲染管线(SRP)兼容性
Unity可编程渲染管线(SRP)是让您能够通过C#脚本控制渲染的一个功能。SRP是支撑通用渲染管线(URP)和高清渲染管线(HDRP)的底层技术。
Unity版本内置渲染管线通用渲染管线(URP)高清渲染管线(HDRP)
2021.3.4f1
兼容
兼容
兼容
描述

Enhance the Debug class with numerous improvements that can greatly improve readability of the Console view and save a lot of time by enabling more compact debugging code to be used.


This is a plug & play solution; all Debug commands in your classes will automatically switch to using the new and improved versions.



Forum - Have new feature ideas or any questions? Let us know here.



—— FEATURES ——


Clean Console

Stack traces are no longer shown for every entry in the Console list.

This greatly improves readability.


Syntax Highlighting

Your console messages are automatically augmented with

colorful syntax highlighting, improving readability even more.


Automatic Context

The context Object is automatically determined for your messages whenever possible to help with locating message sources.


Channels

Prefix a log message with a tag inside square brackets to tie it to a specific channel, then show/hide all messages from specific channels.


Debug.Log(()=>field)

A new compact syntax can be used to log both the name and value of a field to the console.


Debug.LogState(target)

Easily print the full state of a target to the console.


Debug.LogChanges(()=>field)

Have messages be printed automatically whenever the value of a field changes.


Debug.DisplayOnScreen(()=>field)

Easily display the name and current value of any field on the screen.


Debug.LogToFile(message, path)

Easily output messages into text files instead of the console.


Dev.Log(message)

Just like Debug.Log except all calls are omitted from release builds.


Critical.Log(message)

Useful for important messages you don't want getting lost in the shuffle; uses a larger font, full stack trace and always gets recorded in a log file.


Personal Channel

Use your personal channel to log messages that are by default omitted from all users except for you.


Highly Customizable​

Thorough customization options allow you to configure everything to fit your team as well as your personal preferences.


Source Code Included​

Comes with a unity package containing full source code and a convenient DLL builder window.


Console+​ Window

As an added freebie bonus you get an augmented Console window with a convenient channel dropdown menu and a lot of other enhancements.



—— USAGE EXAMPLES ——


Before:

Debug.Log(nameof(target)+"="+(target == null ? "null" : target.ToString()), this);


After:

Debug.Log(()=>target);


Prints:

target=Player



Before:

string message = "MyClass state:\n";

message += "speed=" + speed + "\n";

message += "target=" + (target == null ? "null" : target.ToString()) + "\n";

message += "progress=" + progress;

Debug.Log(message, this);


After:

Debug.LogState(this);


Prints:

MyClass state:

speed=5

target=null

progress=0.25



Before:

void Update()

{

if(myField != lastValue)

{

Debug.Log("myField="+(lastValue = myField)+"\n(was: "+lastValue+")", this);

lastValue = myField;

}

}



After:

Debug.LogChanges(()=>myField);



Prints:

myField=5

(was: 4)

myField=6

(was: 5)

...



—— INSTALLATION ——

Once you have installed Debug.Log Extensions you will be asked whether or not you would like to replace the default Debug class across the project.


If you choose "Yes" and some classes in your project contain the statement "using Debug = UnityEngine.Debug;" it can prevent the project from compiling.


To fix this you just need to remove the statements from your code - they should no longer be necessary when using Debug.Log Extensions anyways.


Alternatively you can opt not to replace the default Debug class. In this case you will need to add "using Debug = Sisus.Debugging.Debug;" in any classes where you want to enable Debug.Log Extensions' enhancements.

技术细节

Console+​ Window

Channels

Debug.Log(()=>field)

Debug.LogState(target)

Debug.LogChanges(()=>field)

Debug.DisplayOnScreen(()=>field)

Debug.LogIf(condition, message)

Debug.Ensure(condition, message)

Debug.Guard(condition, message)

Debug.LogToFile(message, path)

Dev.Log(message)

Critical.Log(message)

Personal Channel

Colorful Syntax Highlighting

Clean Log Entries

Automatic Context

Highly Customizable​

Source Code Included​

Debug.Log Extensions

(9)
106 users have favourite this asset
(106)
$9.99
席位
1
更新的价格和增值税在结算时计算
退款政策
该资源受Unity资源商店退款政策约束。有关详细信息,请参见《最终用户许可协议》(EULA)中的第2.9.3节。
安全结账方式:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
许可证类型
文件大小
4.2 MB
最新版本
1.3.1
最新发布日期
2024年12月4日
原始 Unity 版本
2021.3.4
高品质资源
11000+款5星资源
深受用户信赖
8.5万+用户参与评分
强大的社区支持
10万+社区成员鼎力支持
Unity logo
语言
反馈
合作伙伴计划
合作伙伴
USD
EUR
Copyright © 2025 Unity Technologies
所有价格不包含税
USD
EUR
$9.99