-
Notifications
You must be signed in to change notification settings - Fork 20
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
💡 [Feature]: Support debug option #282
Comments
I would like to work on this problem |
All yours. |
I noticed that when I set the debug flag to true and then switch it back to false, the command responses still behave as if they are in debug mode. Do you know of any way to reset or clear the command responses when switching the flag back to false? From what I’ve researched so far, it seems like there isn’t anything that directly addresses this. Could you help me with this? Another thing I noticed is that when entering debug mode, many outputs are directed to stderr. Most of these outputs are not actual errors, but since they fill stderr, there are validations in the code that treat any output in stderr as an error, preventing the flow from continuing. This happens, for example, during the deploy stage. Could you guide me on how to proceed? I would like to help with this task. |
The way it works is that the So in order not to get debug info we may not pass vscode-viva/src/services/actions/CliActions.ts Lines 203 to 211 in c76154e
This I did not figure out when prototyping this issue. Sorry for that. |
The issue is that after enabling the debug flag and then removing it, the responses in debug mode seem to persist. I followed the approach you suggested in the code. I believe we could go ahead with your suggestion to disable error validation during debugging. However, the problem seems to be that there's some form of caching happening. After entering and exiting debug mode, even when the flag is no longer passed, the debug responses still appear. |
@DevPio do you have this on some branch on your fork? Could I have a check at the code? |
Yes, I have this on a branch of my fork. You can check the code here: issue-282 branch. |
@DevPio I had a check on that but TBH I have no idea why it behaves like this 😅. I did some experimenting but didn't find any work around it and I am checking why CLI actually always returns debug info as soon as we pass debug only once. I will try to do a bit deeper dive on this one next week |
🎯 Aim of the feature
Based on the problem we had in issue #278 it is not the first time that running local instance of CLI for M365, and related commands in debug, gave some answers on what could be the problem. This is some problem as the user needs to install CLI for M365 locally to make the double check which in general is not needed for this Toolkit to work.
The idea is to:
Add a VS Code setting to the extension, maybe a checkbox like 'run CLI commands in debug'
Setting this would add the
--debug
option to each CLI for M365 command and will show their output in the VS Code extension output logs. We should add thedebug
option when any CLI command is executed in this methodsvscode-viva/src/services/CliCommandExecuter.ts
Line 25 in b66d97f
The text was updated successfully, but these errors were encountered: