Customizable Console UI overlay with debug log on top of your iOS App

Related tags

Debugging AEConsole
Overview

Swift 5.1 Platforms iOS CocoaPods Carthage Swift Package Manager License MIT

AEConsole

Customizable Console UI overlay with debug log on top of your iOS App

AEConsole is built on top of AELog, so you should probably see that first.

I wanted to see what's happening 'under the hood' while testing some app AFK (ex. outside). Then I made it possible. Hope you'll like it too, happy coding!

AEConsole

Index

Features

  • All the things from AELog plus:
  • Console UI overlay on top of your App
  • Debug log on device in real time
  • Automatic row height for all log lines
  • Forward touches to your App
  • Shake to toggle Console UI
  • Filter log to find exactly what you need
  • Export log to file if you need it for later
  • Share log file easily via system sharing sheet
  • Customize look as you like it

Usage

Calling Console.shared.configure(in: window) will add Console.View as a subview to your App's window and make it hidden by default. Whenever you need Console UI, you just make a shake gesture and it's there! When you no longer need it, shake again and it's gone.

The rest is up to AELog's logging functionality. Whatever is logged with it, will show up in Console.View.

// MARK: - Console configuration

func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
    /// - Note: Access Console settings
    let settings = Console.shared.settings

    /// - Note: Customize Console settings like this, these are defaults:
    settings.isShakeGestureEnabled = true
    settings.backColor = UIColor.black
    settings.textColor = UIColor.white
    settings.fontSize = 12.0
    settings.rowSpacing = 4.0
    settings.opacity = 0.7

    /// - Note: Configure Console in app window (it's recommended to skip this for public release)
    Console.shared.configure(in: window)

    /// - Note: Log something with AELog
    aelog()

    return true
}
// MARK: - Additional Console API

/// - Note: Check if Console is hidden
Console.shared.isHidden

/// - Note: Toggle Console visibility
Console.shared.toggle()

/// - Note: Add any log line manually
Console.shared.addLogLine(line: "Hello!")

/// - Note: Export log file manually
Console.shared.exportLogFile { (fileURL) in
    do {
        let url = try fileURL()
        /// - Note: do something with a log file at given file URL...
    } catch {
        print(error)
    }
}

Quick Help

This should explain all the features of Console UI:

AEConsole

Feature Description
Export Log will make AELog_{timestamp}.txt file in Application Documents directory and present sharing sheet.
Filter Log filter is not case sensitive.
Toggle Toolbar works for both filter and menu toolbars simultaneously.
Toggle Forward Touches when active you can interact with your App, otherwise you can interact with the log.
Toggle Auto Follow when active it will automatically scroll to the new log lines, otherwise it will stay put.
Clear Log you can't undo this.
Pan Gesture over Menu Toolbar left is more transparent, right is more opaque.

Installation

License

AEConsole is released under the MIT license. See LICENSE for details.

You might also like...
Free macOS app for iOS view debugging.
Free macOS app for iOS view debugging.

Introduction You can inspect and modify views in iOS app via Lookin, just like UI Inspector in Xcode, or another app called Reveal. Official Website:h

In-app design review tool to inspect measurements, attributes, and animations.
In-app design review tool to inspect measurements, attributes, and animations.

Hyperion Hyperion - In App Design Review Tool What is it? Hyperion is a hidden plugin drawer that can easily be integrated into any app. The drawer si

App for developers to test REST API.
App for developers to test REST API.

Httper Httper is a REST API test tool running on your iOS devices. It helps developers to test their REST APIs anywhere and anytime without PC. Featur

A lightweight, one line setup, iOS / OSX network debugging library! 🦊
A lightweight, one line setup, iOS / OSX network debugging library! 🦊

Netfox provides a quick look on all executed network requests performed by your iOS or OSX app. It grabs all requests - of course yours, requests from

Set of easy to use debugging tools for iOS developers & QA engineers.
Set of easy to use debugging tools for iOS developers & QA engineers.

DBDebugToolkit DBDebugToolkit is a debugging library written in Objective-C. It is meant to provide as many easily accessible tools as possible while

Chisel is a collection of LLDB commands to assist debugging iOS apps.

Chisel Chisel is a collection of LLDB commands to assist in the debugging of iOS apps. [Installation • Commands • Custom Commands • Development Workfl

Next generation debugging framework for iOS
Next generation debugging framework for iOS

Alpha is the idea of a next generation debugging framework for iOS applications. It combines multiple debugging tools built on top of a simple, unifie

iOS network debugging, like a wizard 🧙‍♂️
iOS network debugging, like a wizard 🧙‍♂️

Start debugging iOS network calls like a wizard, without extra code! Wormholy makes debugging quick and reliable. What you can do: No code to write an

Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)
Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)

MTHawkeye Readme 中文版本 MTHawkeye is profiling, debugging tools for iOS used in Meitu. It's designed to help iOS developers improve development producti

Comments
  • Dismisses keyboard when logging

    Dismisses keyboard when logging

    Whenever I log something, this line is called and it removes focus from any UITextFields and thus dismisses the keyboard:

    https://github.com/tadija/AEConsole/blob/1f9a7ac78a185d8f53e2e4867b82322a880d417a/Sources/AEConsole.swift#L91

    opened by wgrand 2
  • Ho to manually export log to file

    Ho to manually export log to file

    Hi,

    there is a button, in AECOnsole, to export logs values, to a file, in document app folder.

    how can I do that by code (swift, if possible) ?

    I don't know how to contact you, so I posted a issue,

    sorry for that

    thanks Olivier

    opened by olivier38070 1
  • Loading logs

    Loading logs

    Thank you very much for sharing this awesome project. I’d like to request a feature; loading existing log file. In a smart way that shows last x lines of log by default but supports scrolling up to see more ( load more)

    enhancement help wanted 
    opened by wamra 0
Owner
Marko Tadić
keep it simple
Marko Tadić
In-app console and debug tools for iOS developers

LocalConsole Welcome to LocalConsole! This Swift Package makes on-device debugging easy with a convenient PiP-style console that can display items in

Duraid Abdul 650 Jan 1, 2023
a iOS network debug library, monitor HTTP requests

NetworkEye README 中文 NetworkEye,a iOS network debug library,monitor HTTP requests. It can be detected HTTP request include web pages, NSURLConnection,

coderyi 1.4k Dec 31, 2022
TouchInspector - a lightweight package that helps you visualize and debug touches on iOS and iPadOS

TouchInspector is a lightweight package that helps you visualize and debug touches on iOS and iPadOS.

Janum Trivedi 116 Jan 3, 2023
SwiftUI iOS Debug & HotReloading in VSCode

SwiftUI iOS Debug & HotReloading in VSCode Demonstrating vscode development environment using xcodegen + HotReloading. Language Server Protocol for Sw

Mark Turner 119 Dec 27, 2022
Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened his eyes

GodEye Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened hi

陈奕龙(子循) 3.7k Dec 23, 2022
A swift network profiler built on top of URLSession.

By Xmartlabs SRL. Introduction Xniffer is a non-intrusive framework for intercepting outgoing requests and their responses between your app and any ex

xmartlabs 498 Dec 24, 2022
Remote network and data debugging for your native iOS app using Chrome Developer Tools

PonyDebugger PonyDebugger is a remote debugging toolset. It is a client library and gateway server combination that uses Chrome Developer Tools on you

Square 5.9k Dec 24, 2022
A collection of tools for debugging, diffing, and testing your application's data structures.

Custom Dump A collection of tools for debugging, diffing, and testing your application's data structures. Motivation customDump diff XCTAssertNoDiffer

Point-Free 631 Jan 3, 2023
An in-app debugging and exploration tool for iOS

FLEX FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives

FLEXTool 13.3k Dec 31, 2022
Dotzu In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.

Dotzu In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More. The debugger tool for iOS developer. Display logs, n

Remi ROBERT 1.8k Jan 3, 2023