cg小白兔 发表于 2022-12-28 21:30:07

【更新】Debug.Log Extensions 1.2.6















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.

—— 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.

—— 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.


通过大量的改进来增强Debug类,可以大大改善Console视图的可读性,并通过启用更紧凑的调试代码来节省大量的时间。

这是一个即插即用的解决方案;你的类中的所有Debug命令将自动切换到使用新的改进版本。

-- 特点 --
☑ 清洁控制台
在Console列表中,不再为每条条目显示堆栈痕迹。
这大大提高了可读性。
☑ 语法高亮
您的控制台信息自动增加了
语法高亮,进一步提高可读性。
☑ 自动语境
尽可能为您的信息自动确定上下文对象,以帮助定位信息来源。
☑ 渠道
在日志信息前加上方括号内的标签,将其与特定频道联系起来,然后显示/隐藏特定频道的所有信息。
☑ Debug.Log(()=>field)
可使用新的紧凑语法,将字段的名称和值都记录到控制台。
☑ Debug.LogState(target)
轻松地将目标的全部状态打印到控制台。
☑ Debug.LogChanges(()=>field)
每当一个字段的值发生变化时,就会自动打印信息。
☑ Debug.DisplayOnScreen(()=>field)
在屏幕上方便地显示任何字段的名称和当前值。
☑ Debug.LogToFile(message, path)
轻松地将消息输出到文本文件而不是控制台。
☑ Dev.Log(message)
与Debug.Log类似,只是在发布版本中省略了所有调用。
☑ Critical.Log(message)
用于处理您不希望在混乱中丢失的重要信息;使用较大的字体,完整的堆栈跟踪,并且总是被记录在日志文件中。
☑ 个人频道
使用您的个人频道记录除您以外的所有用户的默认忽略的消息。
☑ 高度可定制
彻底的自定义选项使您能够配置一切,以适应您的团队以及您的个人喜好。
☑ 包含源代码
包含完整的源代码和便捷的DLL生成器窗口的统一软件包。
☑ 控制台+窗口
作为额外的赠品,您将获得一个增强的控制台窗口,其中有一个方便的频道下拉菜单和许多其他的增强功能。

--安装 --
一旦你安装了Debug.Log Extensions,你会被问到是否愿意替换整个项目中的默认Debug类。

如果你选择了 "是",而你项目中的一些类包含 "using Debug = UnityEngine.Debug; "的语句,就会妨碍项目的编译。

要解决这个问题,你只需要从你的代码中删除这些语句--无论如何,在使用Debug.Log扩展时,它们应该不再是必要的。

另外,你也可以选择不替换默认的Debug类。在这种情况下,你需要在你想启用Debug.Log扩展功能的任何类中添加 "using Debug = Sisus.Debugging.Debug;"。





页: [1]
查看完整版本: 【更新】Debug.Log Extensions 1.2.6