Skip to content

How to debug zowe cli code? #2442

Answered by t1m0thyj
JWaters02 asked this question in Q&A
Feb 21, 2025 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

See https://github.com/zowe/zowe-cli/blob/master/docs/DevelopmentTips.md#debugging-in-vs-code for an example of VS Code debug configuration. You can replace args with any CLI command you want to run.

The default location of logs for Zowe CLI is ~/.zowe/logs. If you want to define a custom logging directory in a test script that calls Zowe SDKs, this should work to initialize a Zowe logger that writes to ./logs/app.log:

Logger.initLogger(LoggingConfigurer.configureLogger('.', {name: 'app'}));

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@JWaters02
Comment options

@t1m0thyj
Comment options

@JWaters02
Comment options

Answer selected by JWaters02
Comment options

You must be logged in to vote
2 replies
@awharn
Comment options

@JWaters02
Comment options

Comment options

You must be logged in to vote
2 replies
@t1m0thyj
Comment options

@JWaters02
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants