Questions tagged [immediate-window]

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.

138 questions
17
votes
2 answers

How can I run a foreach loop in the immediate window of visual studio?

I am trying to write values to a file using the Immediate Window in Visual Studio 2017. I've got a variable called _myItems which is of type Dictionary>>. I did hit a breakpoint where this variable is in scope. I can…
Paul Karam
  • 4,052
  • 8
  • 30
  • 53
15
votes
2 answers

Immediate window behavior differences in C# and VB.NET

I have noticed that the immediate window in VS 2010 behaves differently when debugging a C# project and a VB.NET project, although I haven't been able to find any specific documentation of this difference. For C# projects, I can simply type in any…
Marty
  • 7,464
  • 1
  • 31
  • 52
15
votes
2 answers

Why can't I index a std::vector in the immediate window?

So, I have a vector std::vector lines. I fill this vector up, and can access it like std::string temp = lines[0]; However, in the immediate window, both lines[0] - error:overloaded operator not found and lines.at(0) -…
Steve
  • 11,763
  • 15
  • 70
  • 103
14
votes
6 answers

VS 2017 immediate window shows "Internal error in the C# compiler"

I use Visual Studio 2017 (15.6.6). When debugging, I try to evaluate simple expressions like int a = 2; in the immediate window. An error Internal error in the C# compiler is thrown. I tried to enable Use Managed Compatibility Mode as hinted at in…
12
votes
3 answers

Write contents of immediate window to a text file

I'm writing a macro which goes through a document and tries to parse it by Style. Right now, anything in the designated style is copied onto the immediate window. Is there a way to automate the macro further to move the text from the immediate…
Shayon Saleh
  • 419
  • 3
  • 7
  • 15
12
votes
2 answers

Casting of int array into double array in immediate window?

Is it possible to cast int array into double array in immediate window? I tried to cast but somehow its not working. I would like to know that is it possible or not?
User1551892
  • 3,236
  • 8
  • 32
  • 52
12
votes
1 answer

How to declare variables in Visual Studios immediate window in C++?

Recently I discovered that it's possible to declare variables in the Visual Studio immediate window while debugging. This feature is really useful because if I want to experiment with the code in that context, I can create new variables without…
Kirby
  • 3,649
  • 3
  • 26
  • 28
9
votes
2 answers

Calling functions while in debug mode in VC++ (Immediate Window)

I wonder can I call functions during the debug mode in VC++? Assume that I have a function to which I set a break point at, when the execution stops at that point during debugging, can I call other functions and see their results before proceeding…
Jawad
  • 151
  • 1
  • 1
  • 7
9
votes
1 answer

Find out Current Directory during Visual Studio C++ Debug session

I'm debugging C++ native application on Visual Studio 2015. After stopping on a breakpoint, I would like to know the Current Directory. (It could have changed during the execution before stopping on that breakpoint). On .NET debugging it is possible…
9
votes
1 answer

See debug messages of log4net in immediate window

I have an application that uses log4net. I dump debug to a file as well as stdout. When launching the application normally, I see all the messages in the output section as well as in the file. If I create a class/ run a function that writes…
Bartlomiej Lewandowski
  • 10,771
  • 14
  • 44
  • 75
9
votes
2 answers

Visual studio 2013 immediate window and searching slow

I'm running visual studio 2013 with resharper. Fast machine, 24gb of memory, editing, compiling is all lightning fast. If I try to search within the file, or I try to type a command into the immediate window, it's unusable slow - like literally…
Darren Oakey
  • 2,894
  • 3
  • 29
  • 55
9
votes
3 answers

Running a loop while debugging VBA

The Problem I am trying to debug some code, and somewhere in the middle I stopped at a breakpoint. Now I want to change some variables and run a certain loop several times. How far did I get? I know how to change the variables, but somehow I get…
Dennis Jaheruddin
  • 21,208
  • 8
  • 66
  • 122
8
votes
1 answer

Immediate Window automatic cleaning in Visual Studio

I have a question about debugging in Visual Studio. Is it possible to clear the Immediate Window in Visual Studio automatically before each startup of a debugged application? The >cls command and Context Menu->Clear All are useful, but they are not…
Lyubomyr Shaydariv
  • 20,327
  • 12
  • 64
  • 105
8
votes
3 answers

How to evaluate unhandled exception properties in immediate window

I have an unhandled exception that causes the Exception Assistant dialog box to appear. When I click on View Detail..., the exception itself has some values in it's custom object model that will not evaluate in the property grid, but I know I can…
toddmo
  • 20,682
  • 14
  • 97
  • 107
8
votes
6 answers

Why does Visual Studio 2008 tell me .9 - .8999999999999995 = 0.00000000000000055511151231257827?

When I type this into the Visual Studio 2008 immediate window: ? .9 - .8999999999999995 It gives me this as the answer: 0.00000000000000055511151231257827 The documentation says that a double has 15-16 digits of precision, but it's giving me a…
raven
  • 18,004
  • 16
  • 81
  • 112
1
2
3
9 10