Is it expected that a function evaluation in a watch window is "eagerly" evaluated? #14191
-
|
Consider the code such as: https://compiler-explorer.com/z/73jcz5P1Y Set a breakpoint on the first line of main. Run till there. On the watch window to the right, enter, say, fooobject.getabc(0). Then, step into the inner scope where fooobject is instantiated. Because fooobject has no valid getabc(0) at this stage, I immediately encounter the following error at runtime:
Note that this entry in the watch windows could be from a previous debugging session where indeed the watch was valid. Is there a way to prevent this eager evaluation of watch entries? Visual Studio IDE, for instance, has a refresh button so that these evaluations can occur only when the user desires and not eagerly. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
@TryerGit If you can find any instance of VS Code not doing this (for other language debuggers) then I would say it's a bug or feature request. I see TypeScript do the same thing so it seems like there might not be support for the VS "refresh" behavior. |
Beta Was this translation helpful? Give feedback.
@TryerGit If you can find any instance of VS Code not doing this (for other language debuggers) then I would say it's a bug or feature request. I see TypeScript do the same thing so it seems like there might not be support for the VS "refresh" behavior.