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
0
votes
0 answers
C# exception for LINQ Select() in immediate window, but same code works when compiled
When I execute these code lines
var lengths = new CPhqLength[]{new CPhqLength(5, EnumUnitLength.Meter)};
lengths.First().ToString(6)
in the immediate window while the execution of my program is interrupted, I get
Expression has been evaluated and…

Tobias Knauss
- 3,361
- 1
- 21
- 45
0
votes
1 answer
debugger: How to get address of class name in constructor
NOTE: I'm not trying to solve a programming problem; I'm trying to learn.
Given this c++ code:
#include
class class1
{
public:
int attr1 = 12;
class1()
{
} // breakpoint
};
int main()
{
class1…

SAbboushi
- 59
- 6
0
votes
1 answer
Serializing an IEnumerable of objects with Newtonsoft in Immediate Window chops the results
We have tried this code that works in the class but fails in the Immediate Window:
System.IO.StreamWriter file = System.IO.File.CreateText("z:\\file.json");
Newtonsoft.Json.JsonSerializer serializer = new…

user33276346
- 1,501
- 1
- 19
- 38
0
votes
1 answer
Is it possible to execute a python(django) function immediately on vs code?
I want to execute a python function in vs code directly when I set a breakpoint when debugging. Just like Immediate window on Visual Studio

Jonas Newejs
- 92
- 8
0
votes
0 answers
VBA Immediate Window not displaying
Selecting View>Immediate Window or entering CTRL_G no longer has any effect and the Immediae Window Icon haas a red exclamation point - howw to solve this?
0
votes
0 answers
Immediate window in Visual Studio disappears at runtime
In Visual Studio 17.0 I am debugging C# code and pressed Ctrl+Alt+i to open an immediate window and nothing happens. When I stop debugging and use the key combination Ctrl+Alt+i, the immediate window appears. When I start debugging, the window…

Imtiaz
- 1
0
votes
1 answer
How to search assemblies for types that implement desired generic interface
I am searching through assemblies to identify any classes that implement a desired generic interface so I can dynamically instantiate an instance. This is the code I'm using:
var types = assembly.GetTypes();
var assemblyFormatters = types.Where(type…
0
votes
1 answer
Immediate window cannot find class in namespace
I have a method which is located like this in my code
namespace DMR
{
public static class MyClass
{
public static void MyMethod()
{
// Do stuff here
// (...)
}
}
}
I have tried calling it…

Jakob Busk Sørensen
- 5,599
- 7
- 44
- 96
0
votes
1 answer
Updating List using LINQ working when execute from Immediate window, not from code direct
Im facing a very strange problem. I have a list and am trying to update one of its inner structure field from the following for loop.
foreach (var item in AppUserDetail )
{
int AppUserID = item.AppUserId;
…

Sandeep Thomas
- 4,303
- 14
- 61
- 132
0
votes
1 answer
How do you call Assembly in Immediate Window?
I'm trying do some debugging in the Immediate Window, how do you execute things such as Assembly.Get...()? The only thing I get is The name 'Assembly' does not exist in the current context. I do have using System.Reflection at the stack that I'm…

codenamezero
- 2,724
- 29
- 64
0
votes
2 answers
IEnumerable is false in code but true in Immediate Window?
Debugging some code I came across an "is IEnumerable" comparison, which confusingly evaluates to false in code but true in the Immediate Window.
I wonder if anyone can shed light to why this would happen?
Example:
public enum Fruit
{
Apples,
…

mhapps
- 1,023
- 8
- 15
0
votes
1 answer
VS2015: Tooltips stopped showing when hovering on variables in Immediate Window
I remember some time ago I could assign a variable in Immediate Window during debug and when hovering mouse over I could see a tooltip with member values just like when hovering over variables in the code.
Now this feature stopped working in my…

Mariusz Ignatowicz
- 1,445
- 2
- 20
- 41
0
votes
1 answer
Why the FirstOrDefault search on IEnumerable based on RowIndex doesn't work in debug windows?
The below line of code, which does a FirstOrDefault search on IEnumerable based on RowIndex doesn't work in debug windows (in Watch,Quick watch and Immediate window). It throws a System.NullReferenceException in these windows. I'm using Visual…

shanmuga raja
- 685
- 6
- 19
0
votes
0 answers
Why does ITextsharp throw Time Out Exception on this Debug Function the first time?
I spend a lot of time tweaking tables for a PDF I am putting together, so rather than wait until the whole report is finished, download it, open it, scroll down to relevant section... I put together the following debug function:
public…

chrispepper1989
- 2,100
- 2
- 23
- 48
0
votes
2 answers
Peculiar behavior of immediate window in VS 2008
Today something peculiar happened while debugging in VS 2008. I will give the small code snippet
List myPageList = TaskSOM.PageList;
if( myPageList != null && myPageList.Count > 0 )
{
PageHandler aPage = myPageList[0] as…

ferosekhanj
- 1,086
- 6
- 11