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 disappears. What am I doing wrong?
Related
I saw in a video talk by Bart de Smet where he was running Windbg commands by typing them into the Immediate Window in Visual Studio when running the project in debug mode inside the Visual Studio debugger.
So, I wanted to try that myself. So here's what I did:
I went to the Project Properties dialog and then selected the Debug tab, then checked the Enable native code debugging in the Enable Debuggers section.
I set a breakpoint on one of the lines and then launched the project with debugging by hitting F5. When the breakpoint was hit, I opened the Immediate Window and typed the .load command to load sos.dll.
But the message I got as a result read:
.load "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll"
error CS1525: Invalid expression term '.'
Is there something else I need to do?
I am using Visual Studio 2015 Community edition.
Run your application without debugging
Choose Debug/attach to process ...
Choose "Windows User Mode Debugger" as transport
Click "Refresh"
Choose your application
Click "Attach"
Open the "Immediate Window", which will labelled be "Debugger Immediate Window"
Enter WinDbg commands
I always exit Visual Studio when its main window is at a certain area on the screen. But when it starts up, its window is always maximized. If I click the maximize button, it is restored to the size I left it in previous session.
It is bothersome to do this at every program start-up. It covers the area of the screen which it isn't supposed to; making other tools working on that area stay behind. And what makes it even more cumbersome is the bulky and slow start of Visual Studio.
Is there any way of setting the start up window size and position? It is like, in somewhere an option "Start main window maximized" is checked, but I can't find such a thing under Tools > Options. Visual Studio 2010 did do this behavior.
Version: Visual Studio 2012 Ultimate 11.0.51106.01 Update 1
Theme: Dark
When I was using Visual Studio 2010, I could just "Detach All" and the web site would continue to run and the browser wouldn't close. That would enable me to attach a different solution to debug a separately compiled library. Now all that's left is "Stop Debugging" and "Terminate All".
Although the website is still running in the background, I have to open a new browser window and navigate back where I was.
Is there some way to go back to the 2010 functionality?
Detach All is still available in VS 2012. If you don't have it under Debug in Main Menu then you may need to add it manually (right click on toolbar, select Customize.. from context menu).
My watch and immediate window has stopped showing intellisense options automatically until I press Ctrl + Space.
I tried to search any option to enable it again, but couldn't find one.
I am using ReSharper with my Visual Studio 2010, is it something because of it, although I don't remember it stopped working after ReSharper or even before that.
Can anybody please help!
Its a known issue. If you enable resharper's intellisense then intellisense won't work in immediate window:
link
When I am working on a project and compiling all the time, it gets very annoying having to select the code window with the mouse each time after compiling, is there a keyboard shortcut in visual studio to select the code window?
Back when I used Visual Studio, the F4 key went to the next error location in the code and automatically selected the code window. Also try Esc. I think the "next error" keystroke is different in more current versions of VS, so use whatever your keyboard mapping offers.
If you press Alt+W, then Visual Studio opens a list with open windows. You can then select the number corresponding to the window you want to activate. For example, Alt+W,1 activates the first window in the list.