I installed Visual Studio 2005 ( with SP1 ) and made the default settings as what is required for C++ .
Now i open a solution and run the exe . Under ‘ Tools ‘ menu item i go and Select ‘ Attach the process ‘ and i attach it to the exe i just ran . I put breakpoints several places in the code ( this breakpoints looks enabled ) and these are the places where the breakpoints should definitely be hit . But for some reason , my breakpoints are not hit .
PS : All pdb’s are present in correct location .
Is there any setting i am missing .
Perhaps it is attaching to ‘the wrong kind’ of code.
In the ‘Attach to Process’ dialog, there is a setting that allows you to select the kind of code you want to debug. Try clicking ‘Select’ button next to ‘Attach to’ text box and checking only
‘Managed code’the relevant code type.http://img204.imageshack.us/img204/3017/capture5ct4.png
Most of the time, leaving ‘automatically determine the type of code to debug’ setting on works for me. However, in some cases, the debugger is not able to understand that I want to attach to managed code (if I have launched my application from a batch file, for example) and when it does that, the above solution works for me.