Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: ability to resolve structure global structure members on mouse-hover (VSC-1584) #1420

Open
bryghtlabs-richard opened this issue Jan 30, 2025 · 5 comments
Labels
Feature / Enhancement Request Request for Feature/ Enhancement

Comments

@bryghtlabs-richard
Copy link

Is your feature request related to a problem? Please describe.
Yes - when I hover the mouse over a structure's member, it shows me the type(which is nice), but often I actually want to see the data inside the structure.

Example structure definition in header:

typedef struct {
  uint8_t AIFrom;
  uint8_t AITo;
}moveVar;

Example usage site:

extern moveVar moveStatus;

void func(){
  clearChessLEDs();
  convertSendLEDData();
  sequenceAILights(moveStatus.AIFrom, moveStatus.AITo);
}

Hovering on moveStatus.AIFrom shows:

Image

Describe the solution you'd like
I'd like ESP-IDF VSCode to display the structure member variable's value instead, or in addition to, the type. Ideally, the same way that ESP-IDF VSCode displays structure member variables values when allocated on the stack.

Describe alternatives you've considered
I can add each global variable to the watch window, but it's quite time consuming.

@bryghtlabs-richard bryghtlabs-richard added the Feature / Enhancement Request Request for Feature/ Enhancement label Jan 30, 2025
@github-actions github-actions bot changed the title [Feature Request]: ability to resolve structure global structure members on mouse-hover [Feature Request]: ability to resolve structure global structure members on mouse-hover (VSC-1584) Jan 30, 2025
@brianignacio5
Copy link
Collaborator

Unfortunately this a Language extension feature and our extension doesn't implement this yet. In our documentation we suggest users either Microsoft C/C++ extension or Clang extension for language support. It might be best to post a feature request in their respective GitHub repositories.

@bryghtlabs-richard
Copy link
Author

Thanks @brianignacio5 , I've mentioned it in the Microsoft C/C++ extension repo. We can close this if preferred.

@brianignacio5
Copy link
Collaborator

Some follow up questions about your use case @bryghtlabs-richard

  1. Which debug configuration are you using ? I mean how does launch.json looks like?

  2. Does this happens only when you are debugging or also when you just hovering on the source code file ?

I just want to know since a user replied to you in the cpptools repository that is related to debugging, but it is my understanding that hover definitions are handled by the language extension so I'm not sure how is related to debugging.

@bryghtlabs-richard
Copy link
Author

@brianignacio5 , here's my launch.json:

{
  "configurations": [
    {
      "type": "gdbtarget",
      "request": "attach",
      "name": "Eclipse CDT GDB Adapter",
      "initCommands": [
        "set remote hardware-watchpoint-limit 1",
        "mon reset halt",
        "maintenance flush register-cache",
        "thb app_main",
        "source ${workspaceFolder}/build/prefix_map_gdbinit"
      ]
    },
    {
      "type": "espidf",
      "name": "Launch",
      "request": "launch"
    }
  ]
}

Does this happens only when you are debugging or also when you just hovering on the source code file ?

It happens when I'm debugging. I think showing the type would be reasonable when hovering when not in debugging.

Copy link

github-actions bot commented Mar 2, 2025

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Mar 2, 2025
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature / Enhancement Request Request for Feature/ Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants