feat: add --debug-level and --category-level flags to apex run @W-18404446@ - #967
Open
WillieRuemmele wants to merge 5 commits into
Open
WillieRuemmele wants to merge 5 commits into
WillieRuemmele wants to merge 5 commits into
Conversation
…04446@ Allow users to control the debug log verbosity when executing anonymous Apex. --debug-level sets a predefined SOAP log type (NONE, DEBUGONLY, DB, PROFILING, CALLOUT, DETAIL). --category-level sets individual category levels for fine-grained control (e.g., Apex_code=FINEST, Db=FINE).
- Use indexOf('=') for robust key=value parsing (handles extra = segments)
- Trim whitespace from parsed category and level values
- Deduplicate category-level entries (last-wins when same category repeated)
- Add CLI examples for --debug-level and --category-level flags
- Add test for duplicate category deduplication
jfeingold35
approved these changes
Sep 11, 2026
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
--debug-levelflag tosf apex run(options:NONE,DEBUGONLY,DB,PROFILING,CALLOUT,DETAIL)--category-levelflag for fine-grained per-category control (format:Category=Level, repeatable)Dependency
Library PR: forcedotcom/salesforcedx-apex#684
This PR requires the
@salesforce/apex-noderelease from the above PR. After that merges and publishes, bump@salesforce/apex-nodeinpackage.jsonto the new version and the CI build will pass.How to verify
Unit tests (with local library link)
Manual (after library publishes)
@W-18404446@
Test plan
--debug-level DETAILpassesdebugLeveltoexecuteAnonymous--category-level Apex_code=FINEST --category-level Db=FINEpasses structureddebugCategoriessf apex run --help