WHC_Debuger


## Overview


Welcome to the documentation for WHC_Debuger, a powerful debugging tool for iOS developers. In this guide, you’ll find detailed information and instructions on how to integrate and use WHC_Debuger in your projects.


## Installation


### Cocoapods


To install WHC_Debuger using Cocoapods, add the following line to your `Podfile`:

“`ruby
pod ‘WHC_Debuger’, ‘~> 1.0’
“`


### Manual Installation


For manual installation, follow these steps:

1. Download the WHC_Debuger framework from [here](https://github.com/WHCzz/WHC_Debuger).
2. Drag and drop the WHC_Debuger framework into your Xcode project.
3. Make sure to enable the “Copy items if needed” option.
4. Add WHC_Debuger as a target dependency.
5. In your project’s settings, navigate to the “Build Phases” tab.
6. Expand the “Link Binary With Libraries” section and click the ‘+’ button.
7. Select WHC_Debuger.framework from the list and click “Add”.
8. WHC_Debuger is now successfully installed in your project.


## Usage


### Importing


To import WHC_Debuger in your project, add the following line at the top of your source files:

“`swift
import WHC_Debuger
“`


### Enabling Debug Mode


To enable debug mode in your app, call the `enableDebugMode()` method from `AppDelegate.swift` or any other appropriate location in your project.

“`swift
WHC_Debuger.shared.enableDebugMode()
“`


### Logging


WHC_Debuger provides various logging functions for debugging and logging information. Here are a few methods you can use:

1. `WHC_Debuger.shared.log(_:)`: Logs a custom string.
2. `WHC_Debuger.shared.logError(_:)`: Logs an error message.
3. `WHC_Debuger.shared.logWarning(_:)`: Logs a warning message.
4. `WHC_Debuger.shared.logInfo(_:)`: Logs an informational message.

Example usage:

“`swift
WHC_Debuger.shared.log(“This is a custom log message”)
WHC_Debuger.shared.logError(“An error occurred”)
WHC_Debuger.shared.logWarning(“Warning: Check your code”)
WHC_Debuger.shared.logInfo(“Informational message”)
“`


### Breakpoints


WHC_Debuger allows you to set breakpoints in your code for debugging purposes. Breakpoints are useful to pause the code execution at a specific line.

To set a breakpoint, use the `setBreakpoint(_:, function:file:line:)` method, passing the condition as the first parameter and an optional function, file, and line number.

“`swift
WHC_Debuger.shared.setBreakpoint(condition: 5 > 10, function: “myFunction()”, file: “MyClass.swift”, line: 42)
“`


## Documentation


For detailed information about the classes, methods, and properties available in WHC_Debuger, please refer to the [official documentation](https://github.com/WHCzz/WHC_Debuger).


## Contributions and Support


We welcome contributions and bug reports. If you encounter any issues or have suggestions for improvements, please visit the [GitHub repository](https://github.com/WHCzz/WHC_Debuger) and submit an issue or pull request.

For additional support, you can reach out to our community on [Stack Overflow](https://stackoverflow.com/) using the tag “WHC_Debuger”.

We hope you find WHC_Debuger useful in your iOS development endeavors.

Happy debugging!