-1

I am debugging a lot with visual code righ now and have problem with functionality called immediate window. I used to use IntelliJ IDEA evaluation. I would like to evaluate AdjustWindowRect function with different parameters which is in scope but when I typed in I am getting

#include <winuser.h>
unrecognized token

as implication of this I am getting for AdjustWindowRect

identifier "AdjustWindowRect" is undefined

Is even this functionality possible I mean declaring local variables and importing headers and calling functions in Visual Studio? Neither of them works for me. The only thing it works is locals variable which is defined.

Coolman
  • 166
  • 3
  • 11
  • I didn't find the functionality comparable with IntelliJ IDEA Evaluate Expressions, in resharper or in default Visual Studio. That is what I am looking for. – Coolman Mar 31 '20 at 10:41
  • Actually, I am not familiar with Resharper extension. Sorry for that. But what you need can not be got in the current environment. And it seems that there is no such tool. That is not `immediate window`'s job. And the similar issue has confirmed that case. As a suggestion, you can try my suggestion below. If you want this feature as you wished, you can [suggest a feature](https://developercommunity.visualstudio.com/spaces/8/index.html) our DC Forum. – LoLance Apr 02 '20 at 01:20

1 Answers1

0

Is even this functionality possible I mean declaring local variables and importing headers and calling functions in Visual Studio?

As far as I know, immediate window will not catch variables, functions outside the current module by default which means that you cannot use it to obtain info outside the current debug page.

Since AdjustWindowRect function is from winuser.h(a extra head file), you cannot get it on immediate window. You can check this similar issue.

Or use IntelliJ IDEA from Resharper(third party extension) may realize it.

Besides, some workarounds are discussed here which you can try to check whether they do help.

LoLance
  • 25,666
  • 1
  • 39
  • 73