Results 1 to 11 of 11

Thread: Hot to debug Com COmponents

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    20

    Question Hot to debug Com COmponents

    How to debug com component in .Net

    Hai

    How can i debug Com component in .Net environment. i am working with c# windows 2005 and want to debug the com components which referencing

    Please help me in this one


    thanks and Regards
    vinay...
    Last edited by vinaykumar; Oct 19th, 2006 at 02:32 AM.

  2. #2
    Hyperactive Member josep's Avatar
    Join Date
    Sep 2006
    Location
    Barcelona
    Posts
    409

    Re: Hot to debug Com COmponents

    Hi,

    First of all you are in the vb.net forum.

    Saying that, in c# or vb or wathever language, you cannot debug com objects if you do not have source code (if you do not developed probably (99%) you will not have)
    Useful links:DB connection strings ADO.NET VB.NET Tutorials

    • Don't forget to close the thread if solved
    • If this post helps you rate it

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    20

    Re: Hot to debug Com COmponents

    i am having the source code with me.

    Just i need to debug along with my .Net application


    Please send me reply fast as it is urgent for me


    Waiting for the replies
    Thanks and Regards
    Vinay Kumar

  4. #4
    Hyperactive Member josep's Avatar
    Join Date
    Sep 2006
    Location
    Barcelona
    Posts
    409

    Re: Hot to debug Com COmponents

    The you should add the dll project to the solution,

    FIle->add->project

    the you will have two projects on the same solution and you can debug both.
    Useful links:DB connection strings ADO.NET VB.NET Tutorials

    • Don't forget to close the thread if solved
    • If this post helps you rate it

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    20

    Unhappy Re: Hot to debug Com COmponents

    This is the following .Net code


    private void button1_Click(object sender, EventArgs e)
    {

    Button1.Text="test";
    Project1.Class1Class cls = new Project1.Class1Class();
    cls.showButtonValue();
    }


    Project1.Class1Class is a class in com component.

    i put the debug point in the Button and com component when i click the button , After going into the line

    Button1.Text="test"

    it should debug the com component for

    cls.showButtonValue();


    so that i can check whats happening



    Please let me know if any doubts

  6. #6
    Hyperactive Member josep's Avatar
    Join Date
    Sep 2006
    Location
    Barcelona
    Posts
    409

    Re: Hot to debug Com COmponents

    You should go to the class

    in the method showbuttonvalue() and put a breakpoint there on the first line of code for this method.

    By the way this is a VB forum not a C forum
    Useful links:DB connection strings ADO.NET VB.NET Tutorials

    • Don't forget to close the thread if solved
    • If this post helps you rate it

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    20

    Re: Hot to debug Com COmponents

    Though i kept the break point it is not working

    I tried this with Vb2005 .But unable to reslove it

  8. #8
    Hyperactive Member josep's Avatar
    Join Date
    Sep 2006
    Location
    Barcelona
    Posts
    409

    Re: Hot to debug Com COmponents

    A Project must be in debug mode to use breakpoints

    You can change on the 'configuration manager' on the 'build' menu entry
    Useful links:DB connection strings ADO.NET VB.NET Tutorials

    • Don't forget to close the thread if solved
    • If this post helps you rate it

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    20

    Re: Hot to debug Com COmponents

    Boss

    For .Net code debugging is working fine


    for the vb code it is not redirecting to the VB Code .

    i want to know how to debug a com component in .Net?


    Anyway thanks for the reply

  10. #10
    Hyperactive Member josep's Avatar
    Join Date
    Sep 2006
    Location
    Barcelona
    Posts
    409

    Re: Hot to debug Com COmponents

    Man,

    Finally I got you

    I think is not possible to debug that, because the debug feature only can control what is in the the devolpment environment; your class is outside it does not matter if you have the source code or not.


    You have two options
    -use a dummy project on VB6 to test all functionality for this COM object; once it works perfectly the add to a .net project
    -Imports your com object to .NET (it is not as simple as making cofee) and create a .NET dll with the functionality of your com object.
    Useful links:DB connection strings ADO.NET VB.NET Tutorials

    • Don't forget to close the thread if solved
    • If this post helps you rate it

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Oct 2006
    Posts
    20

    Re: Hot to debug Com COmponents

    i added the COM class to the .net application.so debug environment can find it and it is not a right thing to convert them into .net dlls .


    Waiting for any suggestions


    Thanks and Regards
    VInay Kumar

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