One of the views used for debugging purposes in Visual Studio IDE and the VBA IDE. Can be used to display output at runtime, amend properties of variables and objects in break mode, and perform basic queries in break mode and design mode.
Questions tagged [immediate-window]
138 questions
1
vote
2 answers
Format specifiers for VB.NET in Visual Studio in 2013
I've been trying to find a way to render \r\n as actual newlines in the immediate and command window in my VB.NET 4.5.1 application. I came across this question which teaches about the nq specifier, but it appears to apply only to C#. In VB.NET, nq…

oscilatingcretin
- 10,457
- 39
- 119
- 206
1
vote
3 answers
How does the immediate window of visual studio print all members of an object?
How can I using the output window write all the members of an object? Trace.WriteLine uses method ToString and doesn't output all the members. Is there API to do it without writing own code?

Oleksandr G
- 2,060
- 3
- 22
- 31
1
vote
1 answer
How to extract images from Images in Form?
I have an old VB6 project which has a form containing a number of Image objects. That was the way the author had stored images to use on buttons etc. on other forms.
How can I extract the images from these objects to something like a JPG or BMP?
I…

Paul Lassiter
- 2,641
- 5
- 22
- 25
1
vote
4 answers
VB.NET - How to get the instance used by a With statement in the immediate window
VB.NET has a very handy "with" statement, but it also lets you use it on an unnamed variable, like this:
With New FancyClass()
.Level = "SuperSpiffy"
.Style = Slimming
.Execute()
End With
Is there a way to get at the "hidden" instance,…

Andrew
- 8,322
- 2
- 47
- 70
0
votes
0 answers
immediate window: clear before debug.print
I would like to add a code to clear immediate window.
When programming I like to use debug.print.
To make the debug.print a bit more convenient, I wrote a small code below.
A problem occurs, when clearing the immediate window.
On my machine this…

CAtr
- 1
- 1
0
votes
0 answers
How to define a pre-processor directive in the Immediate Window?
I have some code that I want to run in Visual Studio's Immediate Window. It depends on a preprocessor directive. When I try to #Define it in there, I get error CS1525: Invalid expression term ''. My currently selected build configuration changes…

J. Mini
- 1,868
- 1
- 9
- 38
0
votes
0 answers
Visual Studio's IMMEDIATE WINDOW, does not let me run Selenium code
trying to use VS Immediate Window to evaluate next line after a breakpoint.
For example : copying and pasting the following line into the Immediate Window:
driver.FindElement(By.Id("3149335")); it never evaluates anything for me !
after copying the…

user3393601
- 11
- 3
0
votes
1 answer
C# debugging in Immediate Window in Visual Studio 2022 only works for old .net frameworks, but not .Net 5.0
I am working on Visual Studio 2022, building a c# .net class library which used .net framework 4.8.x, but now I have to convert that assembly to .NET 6.0.
I heavily use "immediate window" on VS while programming which works great when working with…

EmbeddedDude
- 171
- 8
0
votes
0 answers
How to see constant's value in visual-studio immediate pane during debug
In Visual Studio I cannot get the value of a constant during debug. This is the declaration part of a function:
Const msroot As String = "https://www.someurl.ext"
Dim tls12 As SecurityProtocolType = 3072
Dim coder As Encoding =…

Black cat
- 1,056
- 1
- 2
- 11
0
votes
0 answers
VBA Code to fetch immediate window to a specific cell
i have a function
Public Sub TEST()
Debug.Print CreateObject("wscript.shell").exec("cmd /V /C wmic os get SerialNumber").StdOut.ReadAll
End Sub
it show my serial number in immediate window as
"SerialNumber
00369-41215-48742-AAGTF"
i want this in…
0
votes
1 answer
Can I run XPATH queries in Immediate window?
Is it possible to run XPATH queries on an active window which is an XML from the Immediate window?
(In my case, I would like to do it to see if I am selecting the correct nodes; but anyway, is it possible and how? Example?)

pencilCake
- 51,323
- 85
- 226
- 363
0
votes
1 answer
Truncated String Visual Studio 2022 Immediate Window C++
I'm developing a MATLAB MEX-file (DLL) in C++ that I'm debugging with Visual Studio. I'm able to successfully step through the code but I'm having problems displaying the contents of certain variables (matrices).
Matrices are stored in contiguous…

kabla002
- 321
- 4
- 13
0
votes
2 answers
Find Immediate Windows localized name in Excel-VBA
Is there a way in VBA-Excel to find how is named the Immediate window in a localized version of Microsoft Office Excel, not English ?
For example, I use an Italian version of Excel, and here Immediate window is called "Immediata", other, for example…

Emanuele Tinari
- 120
- 1
- 2
- 10
0
votes
1 answer
Why do we need the question mark in Immediate Window of VS?
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…

SeReGa
- 1,219
- 2
- 11
- 32
0
votes
0 answers
How to access property of Renci.SshNet.ForwardedPortRemote in C# with Visual Studio
In the immediate window of Visual Studio, with C#, after writing the word port, I am getting this one:
port
{Renci.SshNet.ForwardedPortRemote}
BoundHost: "123.45.67.89"
BoundHostAddress: {123.45.67.89}
BoundPort: 4222
Host:…

Vityata
- 42,633
- 8
- 55
- 100