Repository navigation
feat: add client debug mode - #18
Merged
Merged
Conversation
This reverts commit ca39e95.
This reverts commit 8229848.
This reverts commit 96294e1.
This reverts commit c7657e3.
This reverts commit 9901b81.
- prefix every debug line with local time, milliseconds and UTC offset - one line per API request; REQUEST (POST <url>) and RESPONSE (HTTP ...) blocks for task creation, balance, errors and ready results only - mask credentials as [MASKED], replace base64 images with their length - log the error the caller receives, including fetch failure causes - print SOLVE SUMMARY line by line with serverSolveTime and error Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the server never answers (connection refused, timeout), print "RESPONSE: none - no response from the server (<ErrorName>)" so every logged request shows what happened to its response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CaptchaClientthroughdebug: trueprocessingpolls compact while showing request/response details for task creation, errors, and ready resultssolve()summary with status, task ID/type, elapsed time, server solve time when available, and poll countexamples/debug_mode.jsexampleUsage
Debug mode is disabled by default. Review logs before sharing them because URLs and custom task fields may contain application-specific data.
Run the bundled debug example with a valid API key in
.env:The example creates a real paid CAPTCHA task.
Validation
npm run typechecknpm run test:unit -- --runInBand— 24 suites and 129 tests passednode --checkfor JavaScript examplesgit diff --check