Description
Describe the request
Add an advanced setting (only accessible via the "Preferences: Open Settings (UI)" or "Preferences: Open Settings (JSON)" commands) which will enable debug logging of gRPC calls handled by the Arduino CLI daemon.
This setting would cause a --debug
or --debug-file
flag to be added to the arguments passed to Arduino CLI during the arduino-cli daemon
invocation on Arduino IDE startup.
🙂 This will provide visibility via the console of the exact gRPC operations that are performed, which can be very useful for troubleshooting certain issues, both to determine whether the source, and to determine the specific operations associated with the problem.
Describe the current behavior
The Arduino IDE 2.x code base is intended to be focused exclusively on the GUI of the IDE, while all the underlying operations (e.g., sketch dependencies management, compilation, uploads) is handled by separate tools, most notably Arduino CLI.
Users perceive any problem encountered when using Arduino IDE to be a defect in the IDE. In reality, the fault experienced in the Arduino IDE may only be the symptom of a bug in one of the other tools. The essential first step toward fixing that bug is to determine which project it lives in. Once that is done, development resources can be effectively allocated to investigation and resolution.
Communication between Arduino IDE 2.x and Arduino CLI is done via a gRPC interface. The Arduino IDE's logging output does not always provide a clear picture of the gRPC operations that are being performed by the Arduino IDE.
🙁 It is difficult (most especially for those without a deep familiarity of the internals of the Arduino IDE) to identify the true source of a problem which might be related to the gRPC operations.
TODOs:
- Enable
debug
for the CLI daemon, (Can enable debug logging of the gRPC calls. #1065) - Enable
debug-file
for the CLI daemon.
Arduino IDE version
2.0.0-rc7
Operating system
All
Operating system version
N/A
Additional context
This is an advanced feature which will be used either by advanced users or by users who are guided in its usage by other advanced users.
For this reason, there is no need to put effort towards a polished user experience. It will be no problem if it is necessary to restart the Arduino IDE after adjusting the setting (ideally the setting description would state such a requirement though).
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the latest nightly build
- My request contains all necessary details