Comments (8)
- 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.
- Open the Command Palette and type
Show Output Channel...
and press Enter. - You will see (at least) two channels:
Arduino API
andESP 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 theClear Output
toolbar in the Output view to clear the content. Do the same in theESP Exception Decoder (Log)
channel.
- 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.
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.
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.
@dankeboy36, The unsetting the board and port option and then re-selecting it has fixed the issue for me.
from esp-exception-decoder.
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.
The fault occurs when the board was selected on IDE startup:
To reproduce
- Select File > New Sketch from the Arduino IDE menus.
- Select a board from the Arduino IDE menus.
- Select File > Save As... from the Arduino IDE menus.
- 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. - Select File > Quit from the Arduino IDE menus.
- Start Arduino IDE.
The saved sketches that were open during the previous session will be restored. - Select the window of the sketch you saved during the previous steps.
- 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. - Select any other board from the Arduino IDE menus.
- 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.
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.
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)
- The automated release is failing 🚨
- Exception decoding for RISC-V chips (ESP32-C3, C6, H2, etc) HOT 4
- Arduino IDE 2.1.1 HOT 3
- No debug tab window appears on Arduino IDE 2.1.1 HOT 5
- Fails to use esp-exception-decoder with Arduino IDE 2.1.1 HOT 1
- Arduino IDE 2.2.1 Board: NodeMCU ESP8266 Lolin v3(ESP-12E). Stacktrace isn't recognized HOT 7
- Could not detect any instruction adress in the stack/backtrace HOT 7
- Line numbers of main .ino file seem to be off by one? HOT 1
- Segmentation fault when decoding exeption for ESP8266 generic module HOT 3
- Could not detect the DGB tool path HOT 6
- ESP Exception Decoder Sketch path is not set HOT 5
- Error Activating Extension HOT 3
- Unable to add this extension HOT 2
- Could not find th 'dankeboy36.vscode-arduino-api' extension must be installed. HOT 1
- esp8266 error HOT 1
- [Question about trace format] Could not recognize stack trace/backtrace HOT 3
- Shift+Cmnd+P does not find the decode HOT 5
- Command failed with exit code 3221225477.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-exception-decoder.