VC++ dll debug

Posted on 2005-04-20
Last Modified: 2008-01-09
Hi all,

 I am developing a VC++ COM DLL.  I want to debug the same dll. I want to insert debug point inside dll code.

 can anybody help me

 Thanks in advance,


Question by:sjayendra
    LVL 9

    Expert Comment

    F9 ?
    LVL 7

    Accepted Solution

    You can do this by setting the "Executeable for debug session" to an application that loads the COM dll. Then set a breakpoint in the application just after it loads the dll. Once it is loaded you can set breakpoints in the dll source files.
    LVL 16

    Expert Comment

    Or you can call DebugBreak() in your dll code when your dll is loaded. Then, at runtime, an unhandled exception dialog will appear and you can attach the debugger to your dll.
    LVL 6

    Expert Comment

    Let us say,
    you have an application that loads your dll.
    Build your dll in debug mode, copy the 'finally '.dll'` file in a location(along with the application or in a specific directory or in system folder).
    But remember the application that you launches should load your dll.
    Now go to project->settings. in that select 'debug' in that left side combo.
    go to 'debug' tab, browse and set your application that loads your dll in 'Execute for debug session' text box.

    now use break points in your dll then start debugging by pressing 'F5'.

    Hope this helps.

    Author Comment

    Thanks everybody for answering my question.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now