Skip to content

Variables in the 'Watch' window of the Debugger do not update as the code is single stepped. #504

Not planned
@DaveTur

Description

@DaveTur

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

DaveTur commented on Sep 18, 2021

@DaveTur
Author

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.

added
topic: codeRelated to content of the project itself
topic: debuggerRelated to the integrated debugger
on Oct 24, 2021
per1234

per1234 commented on Dec 2, 2022

@per1234
Contributor

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

assigned and unassigned on Dec 2, 2022
per1234

per1234 commented on Jan 4, 2023

@per1234
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

status: waiting for informationMore information must be provided before work can proceedtopic: codeRelated to content of the project itselftopic: debuggerRelated to the integrated debuggertype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @cmaglie@kittaakos@ubidefeo@per1234@DaveTur

      Issue actions

        Variables in the 'Watch' window of the Debugger do not update as the code is single stepped. · Issue #504 · arduino/arduino-ide