So, reading this documentation: https://learn.microsoft.com/en-us/visualstudio/ide/reference/immediate-window?view=vs-2022
It looks like the question mark (?) is an alias for the command >Debug.Print
, which basically, will evaluate the expression and show the result.
So, in debug mode, instead of running this:
>Debug.Print DoSomething()
I can run this:
? DoSomething()
This is even better because I'm getting the autocomplete suggestions.
Now, the issue is that I can run the same line without a command at all, and it does exactly the same:
DoSomething()
So far looks like there is no need for the command >Debug.Print
or the alias ?
.
At first, I suspected that using ?
will only print the result without changing the values, but this is not the case (When I assign a value to a variable using ?
it is assigned and the new value is printed)
So, am I missing something here? Are there any other differences between these 3 options?