Giter Club home page Giter Club logo

Comments (8)

dankeboy36 avatar dankeboy36 commented on July 23, 2024 2
  • Open the Command Palette with Ctrl/⌘+Shift+P.
  • Type Preferences: Open Settings (UI) and press Enter.
  • Type arduinoAPI.log into the Search Settings <input>.
  • Tick the checkbox next to the preference value.
    arduinoAPI log
  • Open the Command Palette and type Show Output Channel... and press Enter.
  • You will see (at least) two channels: Arduino API and ESP Exception Decoder (Log). If you select one of them, the default Output channel in the Arduino IDE changes, and you will see additional logs.
change_output_channel_in_ide2.mp4
  • Select the Arduino API output channel and click the Clear Output toolbar in the Output view to clear the content. Do the same in the ESP Exception Decoder (Log) channel.
    Screen Shot 2023-09-20 at 15 51 39
  • Unset the board+port selection in the Arduino IDE: open the Command Palette and execute the Developer (Arduino): Clear the Board and Port Selection command. The Arduino IDE will forget your board and port selection in this sketch.
  • Make sure the Exception Decoder terminal is opened.
  • (Re)Select the board and port the usual way you do in the Arduino IDE.
  • Open the Arduino API output channel, copy the log output, and attach it to this issue.
  • Open the ESP Exception Decoder (Log) output channel, and share the log messages with me.
  • Open the Command Palette and execute the Developer (Arduino): Dump the Board List command. The IDE will print a JSON to the Output view and share that output with me.

Thank you!

from esp-exception-decoder.

kittaakos avatar kittaakos commented on July 23, 2024 1

This must be fixed in the IDE2 code. The problem is the same as arduino/arduino-ide#2165 (review) and arduino/arduino-ide#2165 (review). The Arduino state is set by IDE2 too early, and the board+port settings still need to be restored. Here is the overlooked TODO in the PR 🤦 This should fix:

diff --git a/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts b/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts
index 35b4c2ab..4e575430 100644
--- a/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts
+++ b/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts
@@ -76,7 +76,9 @@ export class UpdateArduinoState extends SketchContribution {
   }
 
   override onReady(): void {
-    this.updateBoardsConfig(this.boardsServiceProvider.boardsConfig); // TODO: verify!
+    this.boardsServiceProvider.ready.then(() => {
+      this.updateBoardsConfig(this.boardsServiceProvider.boardsConfig); // TODO: verify!
+    });
     this.updateSketchPath(this.sketchServiceClient.tryGetCurrentSketch());
     this.updateUserDirPath(this.configService.tryGetSketchDirUri());
     this.updateDataDirPath(this.configService.tryGetDataDirUri());

from esp-exception-decoder.

birdoffire1549 avatar birdoffire1549 commented on July 23, 2024

I too have this same issue.
Using Arduino IDE:

Version: 2.2.1
Date: 2023-08-31T14:26:39.874Z (2 weeks ago)
CLI Version: 0.34.0

from esp-exception-decoder.

birdoffire1549 avatar birdoffire1549 commented on July 23, 2024

@dankeboy36, The unsetting the board and port option and then re-selecting it has fixed the issue for me.

from esp-exception-decoder.

dankeboy36 avatar dankeboy36 commented on July 23, 2024

If somebody can reproduce it, please provide the logs. I will look into the defect. I will keep this issue open.

from esp-exception-decoder.

per1234 avatar per1234 commented on July 23, 2024

The fault occurs when the board was selected on IDE startup:

To reproduce

  1. Select File > New Sketch from the Arduino IDE menus.
  2. Select a board from the Arduino IDE menus.
  3. Select File > Save As... from the Arduino IDE menus.
  4. Save the sketch to any convenient name and location.
    This step is performed in order to associate the board selection with a sketch that can be restored on IDE startup.
  5. Select File > Quit from the Arduino IDE menus.
  6. Start Arduino IDE.
    The saved sketches that were open during the previous session will be restored.
  7. Select the window of the sketch you saved during the previous steps.
  8. Run the "ESP Exception Decoder: Show Decoder Terminal" command.
    🐛 The Exception Decoder view shows the message "No board selected" even though a board is in fact selected.
  9. Select any other board from the Arduino IDE menus.
  10. Select the target board once more.
    🙂 The Exception Decoder now recognizes the board selection.

I am happy to provide logs, but I think you will be able to easily reproduce the fault now from the instructions I provided @dankeboy36 so they probably won't be needed.


I notice the fault occurs under the same conditions as arduino/arduino-ide#2230 (comment)

from esp-exception-decoder.

majodi avatar majodi commented on July 23, 2024

Selecting another board and then the right board gave me "Sketch path is not set". Then after opening another sketch, close it and re-open the right sketch finally the exception decoder worked. So it seems that when the IDE is started with an existing project (sketch and board) it will not communicate the board/sketch to your code. I don't know (and don't have time to dive into it) if there is a way to force the IDE API to refresh and give you the current active board/sketch but that's what you need I guess.

from esp-exception-decoder.

dankeboy36 avatar dankeboy36 commented on July 23, 2024

Please use the Arduino IDE 2.x nightly build with the fix: https://www.arduino.cc/en/software#nightly-builds

from esp-exception-decoder.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.