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]: Show contents of string variables in debug mode #55

Open
steinhh opened this issue Nov 19, 2024 · 3 comments
Open

[Feature]: Show contents of string variables in debug mode #55

steinhh opened this issue Nov 19, 2024 · 3 comments
Labels
type: feature New feature or request

Comments

@steinhh
Copy link

steinhh commented Nov 19, 2024

Description

It would be nice to be able to see the contents of local string variables in debug mode

Why it Matters

Seeing the contents of a string variable is useful...

Suggested Behavior

In the local variables list in debug mode, show the contents of string variables. They are currently just shown as

my_string_variable = string, string

It would be more useful to see the contents, e.g.,:

my_string_variable = string, "contents-of-string"

As a corollary, it would be nice to also see (a few) entries in arrays, not just

a = int, array[200]

But:

a = int, array[200]
     [ 2, 5, 6, 99, 1, ...]

Alternate Behavior

No response

@steinhh steinhh added the type: feature New feature or request label Nov 19, 2024
@znorman-harris
Copy link
Contributor

Right now we are working on a brand new debugger and way to interact with IDL. Part of this will include a brand new "hover help" user experience when debugging, amongst other things.

This will likely change quite a bit compared to how it works today, but in general it will show:

  1. Debug information about the variable (with more than type, something analogous to how the IDL Workbench behaves today)
  2. The normal hover help when your debug session of IDL is not running (if you have a string literal we show this value today)

It will be a bit before this gets integrated into the extension (Q1-Q2 2025 depending on a few things we have going right now), but I'll let you know once we get there!

@steinhh
Copy link
Author

steinhh commented Nov 23, 2024

Not sure I understand your response, whether it's just about added functionality compared to current functionality, or replacements. Will local variables still be shown on the left, with string variable contents shown?

Re: "If you have a string literal we show this value today". If do this:

pro test
  b = 'test'
  print, b
end

then in te left hand column it's listed only as "b = string, string" (for me at least). The value is visible in the code, though ;-)

PS: THANKS for this effort, including the rapid responses. I'm thrilled that it seems I can jump from Emacs to VSCode for IDL editing, the last holdout (I use Javascript, C, Perl, PHP, bash, tcsh etc. in VSCode). Not only an end to frustrating switches between key bindings, but it also means I can use Copilot for IDL! I've gotten soo used to Copilot that I very often can predict when its suggestion will come and when it will be correct, so I complete a line manually, hit enter, and then PAUSE while waiting for the suggestion. But in Emacs, the suggestion never comes. Yikes ;-).

@znorman-harris
Copy link
Contributor

Ah, sorry for the confusion. I'm referencing a small detail in VSCode which changes how hover help behaves with/without a debug session running.

Without a debug session, you would see this for a hard-coded string:

image

When debug sessions are running, and you are in the current scope, it looks like this:

image

Specifically, I'm saying that we will likely:

  1. Use the first screenshot as the look and feel for hover help of variables during debug sessions
  2. Potentially include the original value in case you changed the it from what was listed in your code (like what we show when your debug session is not running)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants