Libraries

s&box libraries

Debug Assertions

quality.debugassertions

No summary provided.

About

This library adds Assert functions which are only checked in debug mode (that is, in the editor).
This lets you create reliable code which has no performance impact once the game is released.
This is because C# has an attribute which can actually remove code if DEBUG isn't defined. It completely disappears.

For a taste about defensive programming, please watch the ~9 minutes after this timestamp in this video: https://youtu.be/oitYvDe4nps?t=210
Emphasis on the part at 8:40.

The issue which inspired this project: https://github.com/Facepunch/sbox-public/issues/291
The source code is available at https://gitgud.io/nixx/sbox-debug-assertions

Note: The assertions sit in the Quality.Diagnostics namespace, in case s&box ever add their own.

More by quality

01
Simple Anti-Tamper thumbnail
Simple Anti-Tamper quality.simpleantitamper

Keep your saves safe from tampering!

+0 24h
2favorites
5upvotes
57%Wilson score
02
Changelog Helper thumbnail
Changelog Helper quality.changeloghelper

No summary provided.

gitpublish
+0 24h
0favorites
0upvotes
--Wilson score