Re: Breakpoints and Visual Studio 2005

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"SvenC" <svenc@xxxxxxxxxxxxxxxx> wrote in message news:88433A37-F6E9-4474-81D9-C353E79AF3F7@xxxxxxxxxxxxxxxx
Hi Norman,

One Visual Studio 2005 solution contains a C# project and C++ ATL DLL project. The DLL compiles fine, gets registered automatically, gets referenced correctly when the C# program compiles, and gets called correctly during execution. So far, so good.
...
When not executing, Visual Studio displays a brown dot saying that the breakpoint is valid. When executing, Visual Studio displays a mostly transparent dot with an exclamation mark saying that the breakpoint is not valid. I can right-click the dot and set an option for the "place" of the breakpoint, but it doesn't matter. The breakpoint never gets hit.

Two things:
1) are you using debug builds?

Yes of course.

2) did you enable mixed debugging for managed und unmanaged code? Project->Properties->Debug "Enable unmanaged code debugging"

That was almost enough information to find it. Thank you. I know not to shoot the messenger for this incredibly bad design, and I thank you for informing me.

The solution has two projects in it. Visual Studio's options, Tools - Options - Debug, don't do anything to prevent debugging (I suppose they could be set to prevent debugging but I didn't do so). In the DLL's properties, the debug options don't do anything to prevent debugging. You described an option which is available in the C# project's properties. In order to debug project #1, it's necessary to right-click project #2 and set project #2's properties to enable debugging of project #1. What an easily discoverable (not) way to stop breakpoints from breaking in project #1.

Coming next: To shut down your computer, don't click Start on your computer, but click Start on your neighbour's computer.

.



Relevant Pages

  • Re: QUERY: debugging ASP VBScript
    ... at a breakpoint. ... > the web application running and whenever I want to debug I follow these ... >> on the client and the server. ... you should enable debugging manually on the server ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to turn off Managed Debugging Assistant in VB.NET (2005)
    ... "Menu Bar:" radio and then select Debug from the drop down. ... "Exceptions" in the right list box and click OK. ... My debugging menu has, ... When stopped at a breakpoint in code: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Breakpoint in Worksheet_Change sub
    ... > first call to this event procedure? ... >> get my breakpoint to work when I have run one worksheet ... >> change and the started to debug. ... >> to continue debugging... ...
    (microsoft.public.excel.programming)
  • VS 2005: breakpoints are disabled.
    ... Put a breakpoint on the line; ... Set the value for 'Generate debug information' to yes on the Project ... Property pages: Linker -> Debugging ... have two parallel source safe projects, one with a VS 2003 project and the ...
    (microsoft.public.vsnet.ide)
  • RE: program execution doesnt stop on breakpoints!
    ... you are trying to debug an EXE, a DLL, a control? ... executing a different version of the component than you think you are. ... program doesn't want stop on that breakpoint! ... | To make things more complicated, after few compilation the breakpoint ...
    (microsoft.public.vb.bugs)