Skip to content
A Combine micro debugging package
Branch: master
Clone or download
Latest commit 721fd79 Aug 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.swiftpm/xcode/package.xcworkspace initial commit Aug 15, 2019
Assets initial commit Aug 15, 2019
Sources/CombinePrintout initial commit Aug 15, 2019
Tests initial commit Aug 15, 2019
.gitignore Initial commit Aug 15, 2019
LICENSE Initial commit Aug 15, 2019
Package.swift initial commit Aug 15, 2019 readme update Aug 15, 2019

Combine Printout Logo

A Combine micro debugging framework. It helps you log subscription events to the console so you can track their life cycle.


A debugging print sink

The built-in print() operator is useful but you still need to add a subscriber to your subscription. printSink() is a subscriber that you can use to debug a subscription without the need to add a separate subscriber like so:

Just(["One", "Two"])

printSink() will subscribe the publisher and log all events like so:

Sink: output(["One", "Two"]) 
Sink: finished

A debugging print cancellable

If you're building more complex memory management logic or not sure when are your cancellables released you can use printCancellable() to log a given Cancellable's life cycle like so:

Just(["One", "Two"])
  .assign(to: \.model, on: self)
  .store(in: &subscriptions)

printCancellable() wraps the AnyCancellable returned from assign(to:on:) and logs all the received events:

Cancellable: init 
(self.subscriptions is released from memory)
Cancellable: cancel 
Cancellable: deinit 


Swift Package Manager

Add the following dependency to your Package.swift file:

.package(url: ", from: "0.2")


CombineOpenSource is available under the MIT license. See the LICENSE file for more info.


Copyright (c) 2019 Combine Open Source

Created by: Marin Todorov

You can’t perform that action at this time.