Giter Site home page Giter Site logo

actuallytaylor / hydrogenreporter Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 2.0 10.26 MB

A light weight and feature packed SwiftUI debug tool with the capability to see view state console output

Home Page: https://actuallytaylor.com

License: MIT License

Swift 100.00%
debugging-tool ios logging macos reporter swift swift-package-manager swiftui

hydrogenreporter's Introduction

Hello my name is Taylor!

I like to work on a ton of different projects, and you can often find me just messing around on random things. I have begun to start working more and more on open source work! So if you like what I create let me know!

If you are interested in anything that I work on you can check out my portfolio over at actuallytaylor.com

Open Source Work ๐Ÿคฉ

Contact Me ๐Ÿ”—

GitHub Stats

Top Langs

ActuallyTaylor's GitHub stats

hydrogenreporter's People

Contributors

actuallytaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hydrogenreporter's Issues

App freezes when too much data is written to stdout (in one runloop iteration?)

Hello,

Thank you for Hydrogen Reporter. This is just what I'm looking for.

I'm running into some serious trouble when my app writes to stdout (using Swift's print() function) concurrently from multiple threads. Though the app freezes, I don't think it's concurrency that's causing the problem.

I've been able to reduce the problematic code to a single line:

dup2(stdoutInputPipe.fileHandleForWriting.fileDescriptor, originalSTDOUTDescriptor)

If I comment out this line, my app does not freeze. If I leave it in, my app freezes. Of course, commenting out that line of code breaks the stdout duplication.

Even if I comment out all other code related to to that line:

stdoutInputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify()
NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: stdoutInputPipe.fileHandleForReading , queue: nil) { notification in
let output = self.stdoutInputPipe.fileHandleForReading.availableData
let outputString = String(data: output, encoding: String.Encoding.utf8) ?? ""
DispatchQueue.main.async {
self.consoleOutput += outputString
self.stdout += outputString
}
self.stdoutOutputPipe.fileHandleForWriting.write(output)
self.stdoutInputPipe.fileHandleForReading.waitForDataInBackgroundAndNotify()
}

it still freezes.

I've tried resolving this issue myself, without success. I hope you can help figure this one out.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.