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

Don't show "Unable to eval expression" message box #3227

Closed
kzhui125 opened this issue May 7, 2020 · 4 comments
Closed

Don't show "Unable to eval expression" message box #3227

kzhui125 opened this issue May 7, 2020 · 4 comments
Labels

Comments

@kzhui125
Copy link

kzhui125 commented May 7, 2020

1

In other extensions such as python, if you eval an expression which produces error, the error is only shown in "WATCH".

But in VSCode go extension, the message box is shown, which is not needed.

And the message box pop up again and again, which has very bad experience.

There are cases when you put a variable in watch, but not available in current debug point.

@hyangah hyangah added the debug label May 7, 2020
@hyangah
Copy link
Contributor

hyangah commented May 7, 2020

The error message is from

this.sendErrorResponse(response, 2009, 'Unable to eval expression: "{e}"', {
. I believe how to present the error to users is determined by the vscode and we have little control about that.
Maybe we should report the error in a different way and use the sendErrorResponse sparingly.
@polinasok What do you think?

@ramya-rao-a
Copy link
Contributor

I don't see how we can communicate the error to VS Code if we don't send the error response as shown in

this.sendErrorResponse(response, 2009, 'Unable to eval expression: "{e}"', {

If we remove that, then the watch pane would simply say "not available".
But another place to evaluate symbols is the debug console which would not say anything if we don't send an error response.

@hyangah
Copy link
Contributor

hyangah commented May 29, 2020

My proposal is not to drop the error response, but to find another way (is it possible to formulate it as a regular response, but with some indication on error?). Does anyone know how python extension handles this?

@ramya-rao-a
Copy link
Contributor

Closing in favor of golang/vscode-go#143 due to the repo move. Please subscribe to the new issues for further updates

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants