> For the complete documentation index, see [llms.txt](https://docs.onside.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onside.io/sdk/advanced-and-tooling/debugging.md).

# Debugging & installationId

Diagnostics for OnsideKit: the installationId publisher, SDK console logging, and the SSL-pinning debug switch.

## installationId

`Onside.installationId` publishes the SDK’s installation identifier when available. Include it in support requests, but do not use it as an account identifier or assume every non-`nil` value uniquely identifies an installation.

```swift
static let installationId: AnyPublisher<String?, Never>
```

The publisher can emit `nil` while loading or on error. It can also emit the shared fallback marker `"non-onside"`, which is not a unique identifier. Subscribe after initialization:

```swift
import Combine
import OnsideKit

var cancellables = Set<AnyCancellable>()

Onside.initialize()
Onside.installationId
    .compactMap { $0 }
    .sink { id in
        if id == "non-onside" {
            print("No unique Onside installation ID is available")
        } else {
            print("Onside installation id: \(id)")
        }
    }
    .store(in: &cancellables)
```

The SDK also generates a separate persistent local UUID for its network headers. This UUID is not exposed by `Onside.installationId` and does not require host-app configuration.

## Console logging

OnsideKit prints diagnostic messages prefixed with `[Onside]:`. Watch for them during development:

* **Used before initialization** — a warning that an API was called before `Onside.initialize()`.
* **Event validation** — warnings when an event name or parameter is truncated or dropped. See [Building funnels with event tracking](/sdk/attribution-and-analytics/building-funnels-with-event-tracking.md#validation-rules).
* **Local testing** — confirmation that a `.storekit` file was loaded, or an error if it couldn't be parsed. See [Local Testing](/sdk/advanced-and-tooling/local-testing.md).

## Disabling SSL pinning (debug only)

To inspect SDK network traffic through a TLS-intercepting proxy (e.g. Charles or Proxyman), disable certificate pinning at initialization:

```swift
Onside.initialize(disableSSLPinning: true)
```

{% hint style="danger" %}
`disableSSLPinning` is a debugging aid only. The setting is persisted across launches, and disabling pinning weakens transport security — **never ship it enabled**. Leave it `false` (the default) in production builds.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.onside.io/sdk/advanced-and-tooling/debugging.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
