CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2002
    Posts
    29

    How to debug for a service app and a com app?

    I developed a service app and a component dll with VC6.0.
    In the service app, I called the component via COM interface. Now, I have to debug for this service app and component app.

    I want to insert a breakpoint in the component's code.
    How to do?

    Thanks.

  2. #2
    Join Date
    Jun 2002
    Location
    Clermont-Ferrand(France)
    Posts
    6
    Hi,

    In your component project, flag your line with breakpoint. Then, launch the debug mode (F5). VC6 gonna ask you for an executable file. You may use your own tool that launches this com component. When your component will be called on the breakpointed line, VC6 will give you the hand.
    cout << "Ciao";

  3. #3
    Join Date
    May 2002
    Posts
    29

    But my executable is a service app...

    But my executable is a service app,developed with VC6.0,too. How to launch it for component app debug?
    Thank you.

    Originally posted by esmjum
    Hi,

    In your component project, flag your line with breakpoint. Then, launch the debug mode (F5). VC6 gonna ask you for an executable file. You may use your own tool that launches this com component. When your component will be called on the breakpointed line, VC6 will give you the hand.

  4. #4
    Join Date
    Jun 2002
    Location
    Clermont-Ferrand(France)
    Posts
    6
    If I were U, I'd try ta get out my code from the service and prepare a small executable that launch the com with the right params...
    cout << "Ciao";

  5. #5
    Join Date
    May 2002
    Posts
    29

    In fact,I have tried your method. But...

    Yes, I got my core code from service app and prepare a small executable. But that bug disappears when debuging with the small executable,while it actually exists when running with taht service app.
    Anyway, thank you.
    I will try another way.

    Originally posted by esmjum
    If I were U, I'd try ta get out my code from the service and prepare a small executable that launch the com with the right params...

  6. #6
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664
    Try inserting a DebugBreak() statement, somewhere near the code you want to debug (somewhere in the service exe).

    This is maybe not the most elegant solution, but I think it works. At least try it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured