Skip to content

feat: debugging mode #1029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: debugging mode #1029

wants to merge 6 commits into from

Conversation

AndriiAndreiev
Copy link
Collaborator

@AndriiAndreiev AndriiAndreiev commented May 16, 2025

🚥 Resolves #789

🧰 Changes

This PR adds a debug() method to the API that enables a debugging mode to log HAR data, providing better visibility into what the API is doing under the hood. Since much of the API's behavior can feel a bit "magical," this helps make it more transparent and easier to troubleshoot.

Usage supports two styles:

sdk.debug();
sdk.operation().then(...);

sdk.debug().operation().then(...);

The chained version (sdk.debug().operation()) applies debug mode to just that single operation, while the top-level sdk.debug() enables it globally.

🧬 QA & Testing

Import the generated SDK and enable the debug mode globally or per call using the chained version.

  • Without debug(): No HAR logs should be printed.
  • With global debug(): All subsequent SDK calls should print HAR logs.
  • With chained debug(): Only that specific call should log HAR data.

@AndriiAndreiev AndriiAndreiev changed the title feat: debuggin mode feat: debugging mode May 16, 2025
@AndriiAndreiev AndriiAndreiev added enhancement New feature or request area:core Issues related to `core`, which is the package that powers the SDKs at runtime area:api Issues related to the `api` CLI, which builds the SDKs labels May 16, 2025
@AndriiAndreiev AndriiAndreiev marked this pull request as ready for review May 29, 2025 15:13
@AndriiAndreiev AndriiAndreiev requested a review from erunion as a code owner May 29, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Issues related to the `api` CLI, which builds the SDKs area:core Issues related to `core`, which is the package that powers the SDKs at runtime enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debugging mode
1 participant