Skip to content

Not clear when context menu items inside VARIABLES view must be shown #156

@AdrianOltean

Description

@AdrianOltean

Description
Memory Inspector contributes two context menu items inside VARIABLES view - "Show in Memory Inspector" and "Store Memory to File". But it's not intuitive for users to determine which variables have these menu items enabled. Documentation does not help either and the enablement seems to also depend on the actual debug adapters used. From my experiments, when using CPPDG, menu items are always shown even for non-pointers or references:

Image

Moreover, with CPPDGB, Memory Inspector incorrectly renders memory contents from actual value of the "int" variable, not what's at the integer's address:

Image

When using Cortex Debug, menu items seem to have a more consistent enablement/visibility state, meaning that they are shown for (some) pointers or complex structs, but not for all of them. I couldn't easily figure out all the preconditions for the enablement. So it must be some implementation details from Memory Inspector that need to be documented in order to make it clear when the two menu items are shown.

Image

How to reproduce:

  1. NXP SDK, NXP LPC55S69 board, a J-Link debug probe. Should not matter as long as you can replicate what's written above.
  2. MCUXpresso for VS Code extension installed.
  3. Import a "Hello World" project using the MCUXpresso for VS Code extension.
  4. Debug.
  5. Step into "CLOCK_AttachClk".
  6. Open Variables view and right-click some variables and check the enablement state for the two context menu items.

Expected behavior

  1. Documentation should make it clear in what context must "Show in Memory Inspector" and "Store Memory to File" be enabled.
  2. Don't enable the menu items for non-pointers, unless the extension is capable to render what's at the variable's address, not at its actual value (e.g. for integers).

Environment

  • OS: WIndows 11
  • Theia or VS Code Version: VS Code 1.96.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions