Description
We have received a lot of confusing requests from users who had issues with the Debug feature of this new IDE,
From hard to decipher errors to unsupported hardware.
We are aware of the fact that such functionality can create confusion in both novice and advanced users, so the team and I decided to put together this update.
As we move towards a Beta release (it will be announced when we feel comfortable with giving it the monicker), we have been investigating the behaviour of the included debugger and plan to offer a much better working solution in the near future.
Please try not to ask "are we there yet" every week, just know that we're at work and we're not a big team.
A better debugger is coming, we look forward to releasing it into your hands, but we want it to be good :)
For the current debugger functionality you have to know the following:
- not every board is supported, in fact only ARM Cortex based boards can work
- our current lineup (MKR, Nano 33, Portenta H7) has support, somewhere it's flaky
- support for debug (a debug recipe) must be provided by the platform developer, so please don't ask us to enable debug for boards which we have no control over
- You CANNOT debug an Arduino UNO or a classic Nano
- in the current version of the debugger Global variables are not working and setting booleans fails miseraby: the solution is on its way
- you cannot step into library code, and also this is going to work when we release an update for the debug functionality
- such update will not necessarily come at the next minor Alpha release
Last but not lease: we know that the debug button in the UI is active no matter which board you select, and we're working on this because we don't like it either 😬
Please feel free to ask more questions below, we're more than happy to update this issue and help you get more clarity.
Thank you for reading us
Arduino Tooling Team
Activity
DeqingSun commentedon Oct 10, 2020
It seems arduino-pro-ide shares a lot of code with VScode.
And VScode actually can debug a uno after this merged PR microsoft/vscode-arduino#685
If there is info for making a debug recipe, I can help to get it added.
ubidefeo commentedon Oct 13, 2020
hey @DeqingSun
I'll look into that one, introducing DebugWire support would be interested for a lot of reasons.
@kittaakos can you also take a look on the Theia side?
kittaakos commentedon Oct 13, 2020
What exactly, @ubidefeo?
DeqingSun commentedon Oct 14, 2020
@ubidefeo I got the CLI work nicely with debugger package on
https://raw.githubusercontent.com/DeqingSun/unoDebugTestPackage/main/package_uno_debug_index.json
The set up is the same to https://github.com/DeqingSun/Debugging-Arduino-Uno without the VScode part.
However the pro-ide gave me
-break-insert: Unknown option ``-function''
. No matter I connect debugger or not.ubidefeo commentedon Oct 15, 2020
@DeqingSun
nice progress on this 👍
as we are changing the Debug part of the new IDE we'll investigate this further.
Right now please consider the current debugger as broken, we're working to fix it nicely before next release
DeqingSun commentedon Oct 15, 2020
@ubidefeo Is there a timeline for the next release? If it can be released in 2 week I will try to use the pro IDE for my class, otherwise I'll keep using VScode for teaching this semester.
ubidefeo commentedon Oct 15, 2020
@DeqingSun
we have a few rough edges to polish, so cannot guarantee it'll be done in 2 weeks.
Also as we continue working on the language server and code assist I think we'll try to squeeze both feature in a single release.
Our release cycle could be faster, but I'd rather make sure things are exciting for users 🚀
DeqingSun commentedon Dec 17, 2020
@ubidefeo I tried again with alpha 0.1.3 and it returns error "The debug session type "arduino" is not supported."
Is this something I can fix with editing launch.json or edit board.txt?
rsora commentedon Dec 17, 2020
Hi @DeqingSun, thanks for reaching out again and helping us in making the new IDE better!
Can you please help me in understanding how to reproduce your problem providing:
Thanks!
DeqingSun commentedon Dec 17, 2020
@rsora
I tried multiple board and they throw the same error. "The debug session type "arduino" is not supported."
I tried "Arduino Zero programming port", "Arduino Zero USB port", "Arduino M0 pro programming port", and the avr board I defined. They have the same error.
I'm using the launch.json from https://github.com/arduino/arduino-pro-ide/issues/219 and arduino samd version 1.8.6
Mac 10.14.6
I was trying to debug the Blink example.
And I don't think the HW debugger/tool was even scanned so no hardware is connected to computer.
Deqing
rsora commentedon Dec 17, 2020
@DeqingSun Can you please upgrade the samd core and try again?
We should have the 1.8.10 available.
Thanks!
DeqingSun commentedon Dec 17, 2020
@rsora Thanks, seems the Arduino IDE can start openOCD at least. I'll take a look to see how to get it working for Uno.
DeqingSun commentedon Dec 17, 2020
@rsora
It seems pressing the "Start debugging" button on the top will overwrite the launch.json with a working content. Mine is
But using the debug panel on the left will not create such a template. Just mentioning.
DeqingSun commentedon Dec 17, 2020
Hi @rsora, it seems I got some progress.
The new Pro IDE 0.1.3 changes the Debugger configuration in platform.txt.
So far I got 2 issues. First the IDE is always looking for
arm-none-eabi-gdb
for toolchain. Is it possible to override the file's name?Also the server is called with argument
"-c" "gdb_port 50000" "-s" "/Users/sundeqing/Documents/Arduino/testDebug" "-f"
. Is it possible to customize the arguments?I used this setting
Update, refering to the code on https://github.com/Marus/cortex-debug/blob/a5a07dbbfa6acf53b157a62f4215b36c1ff854ca/src/openocd.ts , the serverArguments are hard coded.
41 remaining items