Description
To see new values of the watched variables, that variable has to be added again to the Watch window.
The target Arduino Zero was connected to my PC using a Segger Mini EDU.
I set a break-point in the function of interest, which performs a shallow copy of an object. After hitting the break-point, the source and destination objects were displayed in the Watch window, the source showing expected values and the destination showing random uninitialised values. While single-stepping the code, the destination values did not change. Setting a further break-point on the function exit, the code was run until this second break-point was hit. The destination values were still unchanged in the watch window. After again adding the destination object to the Watch window, the expected correct values were seen, while the values in the destination object that was added to the Watch window before the copying still showed the old random values.
I expect to see the destination values change as the code is either single-stepped or when it stops after being run to the exit break-point.
My PC is running Windows 10 Pro 64 bit.
The Arduino IDE is 2.0.0-beta. 11
Activity
DaveTur commentedon Sep 18, 2021
During a later debug session, I see that the value of simple Watched variables ARE seen to update when changed by code. Previously I had the name of a class instance in the watch window and it was the values of its members that were not being updated in the watch window.
per1234 commentedon Dec 2, 2022
Hi @DaveTur. Thanks for your report. Please check to see whether the bug still occurs with the latest nightly build of Arduino IDE and then comment here to let us know what you found.
The "Cortex-Debug" extension used for the Arduino IDE integrated sketch debugger was recently updated, which has fixed several other bugs, including a very similar one related to watch expressions (#412), so I think there is a good chance this one was also fixed.
The nightly build download links are listed here:
https://www.arduino.cc/en/software#nightly-builds
per1234 commentedon Jan 4, 2023
Closing due to lack of response.
@DaveTur if you ever find the time to make another test with the latest nightly build and find the problem still occurs, please comment here and I'll be happy to re-open this issue and try to make an investigation.