arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.28k stars 388 forks source link

The latest `Raspberry Pi RP2040 Boards` platform's debug configuration is incompatible with 2.3.0 #2368

Closed Kabron287 closed 8 months ago

Kabron287 commented 8 months ago

Describe the problem

Debug option absent in 2.3 while it present in 2.2.1 Debug23

To reproduce

Just run app.

Expected behavior

Debug option absent

Arduino IDE version

2.3

Operating system

Windows

Operating system version

10

Additional context

No response

Issue checklist

kittaakos commented 8 months ago

What does the tooltip tell when you hover over the disabled Debug toolbar item?

Kabron287 commented 8 months ago

What does the tooltip tell when you hover over the disabled Debug toolbar item?

No programmer selected for Raspberry Pi Pico W Pico DebugProbe is connected.

kittaakos commented 8 months ago

OK. It is not a bug, but let's check. What happens when you select the programmer from the Tools > Programmer menu?

A programmer must be selected for the debugger to start in Arduino IDE 2.3.0+: https://github.com/arduino/arduino-cli/pull/2443.

IDE2 intentionally disables the debug functionality when no board or programmer is selected. See https://github.com/arduino/arduino-ide/pull/2342 for more details. We track a related follow-up at https://github.com/arduino/arduino-ide/issues/2345 that is specifically connected to the custom board options.

You can define a default programmer in your boards.txt if you're a platform developer. Or you can request this as a feature from your core developers. For more details, see https://github.com/arduino/arduino-cli/pull/2416.

Kabron287 commented 8 months ago

OK. It is not a bug, but let's check. What happens when you select the programmer from the Tools > Programmer menu?

Please, show me where Programmer is? Debug23_1

Kabron287 commented 8 months ago

I see no meanfull information in the links, you provided.

kittaakos commented 8 months ago

Thank you for providing more information on the problem.

I have opened a follow-up: https://github.com/earlephilhower/arduino-pico/issues/2003

Arduino IDE users using the current version of Raspberry Pi RP2040 Boards platform must use version 2.2.1 to enable the debugging.

I decided to leave this issue open for visibility reasons, but this problem cannot be fixed in this repository. I appreciate your understanding.

fpistm commented 8 months ago

Have the same issue with STM32 core. Honestly I don't understand why a programmer is requested now. It is not very clear how to properly support the new requested configuration.

kittaakos commented 8 months ago

We created a tester build and made the programmer optional for the debugger. Please help us and let us know how the changes work on your system. The PR is here: https://github.com/arduino/arduino-ide/pull/2371. See the documentation on how to use the tester builds and report back: https://github.com/arduino/arduino-ide/blob/main/docs/contributor-guide/beta-testing.md. We appreciate your help.

fpistm commented 8 months ago

Hi @kittaakos Thanks for the quick feedback and implementation. I will test next monday and give you a feedback.

ubidefeo commented 8 months ago

Honestly I don't understand why a programmer is requested now.

@fpistm unfortunately we didn't have enough input/feedback during implementation. We were working with Espressif and noticed how they hacked debugging leveraging our debug_custom.json which we always said was a hack, unsupported, experimental. Too bad many devs went Arduino 1.x style and just hacked the platform. When it came to making debugger something that 3rd party core devs could really leverage, the hacks broke.

I'm confident we did our best in offering an extensible debugging platform, but must apologise if we broke things for some. Hope we can make it up to you all 🙏🏼

u.

fpistm commented 8 months ago

Hi @kittaakos I've tested your PR and confirm it works as expected: image

@ubidefeo No worry, I know it was experimental. I've also opened some GH issues around the debug config. My concern was simply to understand why a programmer description was required within the 2.3.0 version. I will investigate the new way the debug should be defined/extended and update the STM32 core to enhance debug user experience. Finally, I know you (and all Arudino IDE/CLI contributors) do your best to provide good user experience. So thank you all :clap: for all the hard work, I know how it can be hard.

And thanks for fixing the issue with the debug interface within the 2.3.1, as I met it during my first attempts to get the debug working again within the 2.3.0 version and wonder if I made a mistake :wink: .

kittaakos commented 8 months ago

We created a tester build and made the programmer optional for the debugger. Please help us and let us know how the changes work on your system. The PR is here: #2371. See the documentation on how to use the tester builds and report back: https://github.com/arduino/arduino-ide/blob/main/docs/contributor-guide/beta-testing.md. We appreciate your help.

@Kabron287, could you please try out the tester build with the fixes 👆? If they work, we can do a patch release. Thanks for the help!

kittaakos commented 8 months ago

Linking #103 here.

Kabron287 commented 8 months ago

Solved. And it works now! On both cores. Debug