{"id":15101875,"url":"https://github.com/realchrisdebon/consoledebugger","last_synced_at":"2026-02-27T23:31:34.513Z","repository":{"id":238596224,"uuid":"796774784","full_name":"realChrisDeBon/ConsoleDebugger","owner":"realChrisDeBon","description":"A lightweight utility for console application debugging. Great for multi-threaded and asynchronous operations that may be doing background work or networking.","archived":false,"fork":false,"pushed_at":"2025-05-13T14:02:16.000Z","size":240,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-02T12:01:10.926Z","etag":null,"topics":["audio","console-debugger","console-library","debugging","logging","nuget","nuget-package"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realChrisDeBon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-06T15:50:39.000Z","updated_at":"2025-05-13T14:02:19.000Z","dependencies_parsed_at":"2025-05-13T15:25:48.477Z","dependency_job_id":"fb2a197c-40c3-41a5-8ccd-bef549e3ea89","html_url":"https://github.com/realChrisDeBon/ConsoleDebugger","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":"0.33333333333333337","last_synced_commit":"9af626a37648dd0f7df5472c5040941a5efc4236"},"previous_names":["realchrisdebon/consoledebugger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/realChrisDeBon/ConsoleDebugger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realChrisDeBon%2FConsoleDebugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realChrisDeBon%2FConsoleDebugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realChrisDeBon%2FConsoleDebugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realChrisDeBon%2FConsoleDebugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realChrisDeBon","download_url":"https://codeload.github.com/realChrisDeBon/ConsoleDebugger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realChrisDeBon%2FConsoleDebugger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264506902,"owners_count":23619095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","console-debugger","console-library","debugging","logging","nuget","nuget-package"],"created_at":"2024-09-25T18:42:12.743Z","updated_at":"2026-02-27T23:31:34.482Z","avatar_url":"https://github.com/realChrisDeBon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://github.com/realChrisDeBon/ConsoleDebugger/assets/97779307/b4e98abb-75bd-41f1-ad27-2cbac025295f\" width=\"175\" height=\"175\" alt=\"ConsoleDebugger logo\"\u003e\n  \n   ConsoleDebugger\n\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003e\nQuick, simple, easy logging and debugging.\n\u003c/h3\u003e\n\n## Overview\n\nConsoleDebugger is a lightweight utility for console applications, providing robust logging and debug message management. It is ideal for applications with multiple asynchronous methods, background processes, or network operations. As of v1.0.8, advanced features such as audible beeps and float tracking are now available as separate extension packages, reducing the core package size and dependencies for users who only need basic logging.\n\n## Installation\n\nTo use ConsoleDebugger in your C# console application:\n\n1. Install the core ConsoleDebugger package via NuGet:\n```dotnet\ndotnet add package ConsoleDebugger --version 1.0.8\n```\n2. Add the following using directive in your C# files:\n```csharp\nusing ConsoleDebugger.ConsoleDebugger;\n```\nOr, for a more functional approach:\n```csharp\nusing static ConsoleDebugger.ConsoleDebugger;\n```\n\n### Optional Extensions\n\n- **Audible Beeps:**  \n  Install `ConsoleDebugger.Beeps` for beep/tone support:\n  ```dotnet\n  dotnet add package ConsoleDebugger.Beeps --version 1.0.8\n  ```\n  ```csharp\n  using ConsoleDebugger.Beeps;\n  ```\n\n- **Float Tracking:**  \n  Install `ConsoleDebugger.FloatTracker` for auditory float tracking:\n  ```dotnet\n  dotnet add package ConsoleDebugger.FloatTracker --version 1.0.8\n  ```\n  ```csharp\n  using ConsoleDebugger.FloatTracker;\n  ```\n\n## Usage\n\n### Logging Debug Messages\n\nLog debug messages with different colors and message types:\n```csharp\nResult result = SomeNetworkFunction(); // example function\nConsoleDebugger.DebugMessage(\"We started the network function.\");\nif(result == Good){\n   ConsoleDebugger.DebugMessage($\"Here's the result {result.ToString()}\", ConsoleColor.Blue);\n} else {\n   ConsoleDebugger.DebugMessage($\"Critical error occurred: {result.Message}\", MessageType.Critical);\n}\n```\n\n#### Logging Categories\n\nYou can define and control logging categories:\n```csharp\nvar netCategory = new LoggingCategory(\"Network\");\nConsoleDebugger.AddLoggingCategory(netCategory);\nConsoleDebugger.DebugMessage(\"Network started\", netCategory);\n```\n\nYou can also control which logging categories are shown in the console output. By default, all categories are considered enabled. Use `ActivateLoggingCategory(category)` to enable console output for a category, or `DeactivateLoggingCategory(category)` to suppress it so the category no longer outputs to the console. \n\n**Note:** Logging categories are always included in the file log if file logging is enabled, regardless of their console output status.\n\n### Optional File Logging\n\nYou can log messages to a file in either `.txt` or `.csv` format. By default, logs include the message, but you can configure additional options such as including timestamps, logging categories, and message types. The output format and included fields are controlled via the `LoggingConfiguration` class.\n\n- **.txt format:** Plain text log entries, optionally with timestamp, category, and message type.\n- **.csv format:** Comma-separated values, suitable for importing into spreadsheets or analysis tools. Each field (timestamp, category, type, message) appears as a column if enabled.\n\nEnable or disable file logging:\n```csharp\nConsoleDebugger.StartLogging();\n// ... your code ...\nConsoleDebugger.StopLogging();\n```\nConfigure logging style and options via the `LoggingConfiguration` class, for example:\n```csharp\nvar config = new LoggingConfiguration {\n    IncludeTimestamp = true,\n    IncludeCategory = true,\n    IncludeMessageType = true,\n    LogFormat = LogFormat.Csv // or LogFormat.Txt\n};\nConsoleDebugger.SetLoggingConfiguration(config);\n```\n\n### Audible Beeps (Extension)\n\nTo use beeps, ensure you have installed the `ConsoleDebugger.Beeps` package and initialized beeps:\n```csharp\nConsoleDebugger.InitializeBeeps();\nConsoleDebugger.DebugBeep(TonePitch.Do, ToneLength.Short);\nConsoleDebugger.DebugBeep(TonePitch.Re, ToneLength.Short);\n```\n\n### Tracking Float Variables (Extension)\n\nTo use float tracking, ensure you have installed the `ConsoleDebugger.FloatTracker` package and initialized float tracking:\n```csharp\nConsoleDebugger.InitializeFloatTracking();\nfloat valueToTrack = 0.0f;\nvar synthesizer = ConsoleDebugger.StartTrackingFloat(ref valueToTrack, 0.0f, 100.0f);\n```\nAs `valueToTrack` changes, an auditory tone will represent its value within the specified range.\n\n## Function Details\n\n### Core\n\n- `DebugMessage(string message, LoggingCategory category = default)`\n- `DebugMessage(string message, ConsoleColor color, LoggingCategory category = default)`\n- `DebugMessage(string message, MessageType type, LoggingCategory category = default)`\n- `StartLogging()`, `StopLogging()`\n- Logging category management: `AddLoggingCategory`, `RemoveLoggingCategory`, `ActivateLoggingCategory`, `DeactivateLoggingCategory`, `LoggingCategoryActive`\n\n### Beeps Extension\n\n- `DebugBeep(TonePitch pitch, ToneLength duration)`\n- `InitializeBeeps()`\n\n### Float Tracker Extension\n\n- `StartTrackingFloat(ref float target, float minrange, float maxrange) : FloatSynthesizer`\n- `InitializeFloatTracking()`\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealchrisdebon%2Fconsoledebugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealchrisdebon%2Fconsoledebugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealchrisdebon%2Fconsoledebugger/lists"}