Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Can enable debug logging of the gRPC calls. #1065

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

Merged
kittaakos merged 1 commit into main from #1056
Jun 17, 2022
Merged

Can enable debug logging of the gRPC calls. #1065

kittaakos merged 1 commit into main from #1056
Jun 17, 2022

Conversation

Copy link
Contributor

@kittaakos kittaakos commented Jun 16, 2022
edited
Loading

Motivation

Can enable the debug logging of the gRPC call to the Arduino CLI.

Change description

How to test:

  • Open the ~/.arduinoIDE/settings.json, you can use IDE2 or your favorite text editor,
  • Add "arduino.cli.daemon.debug": true to the settings.json file and save it,
  • Start the IDE2 from a terminal, see that debug calls, such as:
daemon INFO 3 | RESP: {
3 | "download_progress": {
3 | "url": "https://downloads.arduino.cc/packages/package_index.tar.bz2",
3 | "file": "Downloading index: package_index.tar.bz2",
3 | "total_size": 41847
3 | }
3 | }
3 | RESP: {
3 | "download_progress": {
3 | "downloaded": 41847
3 | }
3 | }
3 | RESP: {
3 | "download_progress": {
3 | "completed": true
3 | }
3 | }

Other information

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

per1234 reacted with thumbs up emoji
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 16, 2022
Comment on lines +163 to +165
if (debug) {
args.push('--debug');
}
Copy link
Contributor

@AlbyIanna AlbyIanna Jun 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be useful to let the user set the debug file too, like this:

Suggested change
if (debug) {
args.push('--debug');
}
if (debug) {
args.push('--debug');
if (debugFilePath) {
args.push('--debug-file');
args.push(debugFilePath);
}
}

Copy link
Contributor

@AlbyIanna AlbyIanna Jun 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but in that case, we should take care about deleting the file after every start-up, otherwise the file size will grow indefinitely.

Copy link
Contributor Author

@kittaakos kittaakos Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

I edited the commit message and the PR; my changes won't close #1056. I will let you wrap it up when you have figured out how to do the file-based logging.

Copy link
Contributor

@AlbyIanna AlbyIanna Jun 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kittaakos ok I asked @cmaglie to make a change in the arduino-cli in order to recreate the log file every time the IDE is restarted. In the meantime, I'm going to add the flag because it already works anyway

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is working perfectly for me and having access to this information has already proven to be very helpful for investigating behavior of the Arduino IDE and Arduino CLI.

Thanks Akos!

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos merged commit 94ceefd into main Jun 17, 2022
@kittaakos kittaakos deleted the #1056 branch June 17, 2022 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 per1234 approved these changes

+1 more reviewer

@AlbyIanna AlbyIanna AlbyIanna approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add setting to enable Arduino CLI daemon debug output

AltStyle によって変換されたページ (->オリジナル) /