Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Use ListPackageVars to show global variables #1865

Merged
merged 3 commits into from
Aug 23, 2018
Merged

Use ListPackageVars to show global variables #1865

merged 3 commits into from
Aug 23, 2018

Conversation

ramya-rao-a
Copy link
Contributor

This PR enables use to have the global variables in the current package show up in the variables pane.
Fixes #1854
Doesnt work for remote debugging at the moment.

@lggomez Thoughts?

@lggomez
Copy link
Contributor

lggomez commented Aug 22, 2018

Neat

Are you sure about remote not working @ramya-rao-a ? I could see the globals just fine locally, at least with delve Version 1.0.0 - Build: $Id: c98a142125d0b17bb11ec0513bde346229b5f533

Also a minor detail, but we could filter the initdone variable. It seems to be a global inyected by internal package initialization code, and it should never be != 2 during debugging (in a sane scenario)

@ramya-rao-a
Copy link
Contributor Author

The remote scenario would need us to map the remote file to local file and then use the local file to determine the package name/import path. I didn't want to include that in the first go as I didn't have the time to test it out.

Good point about initdone. I'll update accordingly.

@ramya-rao-a
Copy link
Contributor Author

Ok, I've updated the PR to support remote paths as well.
@lggomez Could you give it a try?

@ramya-rao-a ramya-rao-a merged commit 19cfd83 into master Aug 23, 2018
@ramya-rao-a ramya-rao-a deleted the globals branch June 10, 2020 17:25
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants