FAQ Database Discussion Community


Why breakpoint is not reached in VisualStudio 2010?

c#,visual-studio-2010,visual-studio-debugging
static void Main(string[] args) { List<int> li = new List<int>() { 1, 20, 30, 4, 5 }; GetNosLessThan5(li); } public static IEnumerable<int> GetNosLessThan5(List<int> numbers) { foreach (var v in numbers) { if (v < 5) yield return v; } } I have put a debug point at the start...

Is there a better way to pass formatted output to OutputDebugString?

c,debugging,winapi,visual-studio-debugging,visual-studio-macros
Typically, when I need to do debug output in Windows, I use the following C code segment: #ifdef _DEBUG #define DBGPRINT( kwszDebugFormatString, ... ) \ { \ wprintf_s( L"[%s:%d] ", __FUNCTIONW__, __LINE__ ); \ wprintf_s( kwszDebugFormatString, __VA_ARGS__ ); \ } #else #define DBGPRINT( kwszDebugFormatString, ...) ;; #endif I'd like to...

Debugger not started in the VS2008

asp.net,visual-studio-2008,iis-7.5,visual-studio-debugging
I have developed web application in .NET framework 3.5 in VS 2008, hosted in IIS under application pool ASP.NET 4.0 Integrated pipeline mode. When I start debugging by hitting F5 button, it throws the error and debugger is not started. But, If I open the same application in VS2010 and...

How to filter output in Visual Studio 2012+?

visual-studio,visual-studio-debugging
I am having problem inspecting specific things in my Debug.WriteLn output in Visual Studio 2015. (Same thing in 2012 and 2013 version too.) XCode and Eclipse both include a filter-box on top of the Output window. I tried to find a similar extension for Visual Studio but I had no...

Unable to use “User Mode Debugger” in VS2013 on VirtualBox machine

visual-studio,visual-studio-2013,visual-studio-debugging,wdf
Trying to configure Visual Studio 2013 (pro, FWIW) to debug a VirtualBox host. I followed this guide and set up the host correctly: It works for kernel mode, but not for user mode. Here is the debugger settings: When I use kernel mode it works (and I'm debugging the kernel...

is there a difference between running an executable and debugging it in Visual Studio?

c++,visual-studio-2010,winapi,runtime-error,visual-studio-debugging
I'm writing a piece of code in Windows which uses both winapi messagebox and some dynamic memory for RS232 application I saw a strange situation when the same application creates different error when I run it in debugging mode (using VS2010 and step-in debugging) and running it as an executable...

Using/abusing a conditional breakpoint to manipulate a value

.net,visual-studio-2013,visual-studio-debugging
For a temporary workaround, I have to set User.ID to 0 in a certain line. My usual approach for similar cases is to set a breakpoint at the corresponding line and use the watch to manipulate the value: User.ID = 0 In an attempt to streamline this by automatically setting...

C# String.getHashCode() returning same value for different strings [duplicate]

c#,visual-studio-2013,visual-studio-debugging
This question already has an answer here: string.GetHashCode() returns different values in debug vs release, how do I avoid this? 3 answers Calculate MD5 checksum for a file 2 answers My application is running as a windows service and I'm attaching VS2013 to it's process to debug. I'm getting...

VC++ SSE code generation - is this a compiler bug?

visual-c++,assembly,x86,sse,visual-studio-debugging
A very particular code sequence in VC++ generated the following instruction (for Win32): unpcklpd xmm0,xmmword ptr [ebp-40h] 2 questions arise: (1) As far as I understand the intel manual, unpcklpd accepts as 2nd argument a 128-aligned memory address. If the address is relative to a stack frame alignment cannot be...

Wierd behavior with Visual Studio Debugger

visual-studio-2013,gpu,visual-studio-debugging,directx-11
I experienced some weird behavior with Visual Studio's Debugger when running VS with the Dedicated GPU. What is weird is that when I terminate the program I am building, the debugger stays on. I don't see this when running VS with the integrated graphics. Also - I checked if there...

How to Tell VS 2012 to Finish Debugging Session and Skip Remaining Breakpoints

visual-studio-2012,visual-studio-debugging
I'm debugging a program using Visual Studio 2012. It goes through the same functions multiple times using different parameters. As I learn more information from the debugging session sometimes I want to start over, but with the architecture we are using it would be easier to just finish running the...

I'm getting an “Invalid length for a Base-64 char array or string” error in generated temp file?

debugging,umbraco,visual-studio-debugging
As the title suggests, I'm getting this error when I run the project from Visual Studio locally at runtime. It builds just fine. Invalid length for a Base-64 char array or string. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace...

Visual Studio: How do you dock two Debug Windows Side-by-Side? (Immediate & Call Stack)

visual-studio,visual-studio-2012,visual-studio-debugging
QUESTION how do you DOCK two DEBUG windows side-by-side? For the last year while debugging I had the Immediate Window DOCKED NEXT to the Call Stack window, both visible at the same time (as depicted by the attached image). Then last week I lost this desired config by fat fingering...

Debugging from a View file

visual-studio-2010,asp.net-mvc-4,svn,visual-studio-debugging
Working on a C# MVC project, I can have multiple files open in Visual Studio. When I press F5 to start debugging, the debugging starts if the currently open file is: a controller (*.cs); a model (*.cs); a stylesheet (*.css); a config file (*.config); a partial view (*.cshtml) However, if...

breakpoint isn't hit when running 2 instances of the same project on VS2013

c#,visual-studio-2013,visual-studio-debugging
I created 2 instances of same project to apply different changes. So when I open project1 and debug class1, everything is smooth, I can have my breakpoints hit all other debugging features. When I open project2 and close project1, I try to do same debugging on class1(some lines of the...