dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Debugging Multithreaded Application

  1. #1
    Join Date
    Aug 1999
    Location
    Germany
    Posts
    2,338

    Debugging Multithreaded Application

    Hello! I got a multithreaded application and need to debug it. My problem is that setting breakpoints is working, but from stopping the application to be able to watch variables, call stack and so on, it takes Visual Studio 2005 about 1-2 Minutes to display these values - I have no idea what it's doing in this time.

    Is there a way to make this faster, because so debugging takes a lot of time.

  2. #2
    Join Date
    May 2009
    Location
    Bengaluru, India
    Posts
    435

    Re: Debugging Multithreaded Application

    Just go to Build menu option and run "Clean Solution" submenu option - that would speed up your debugging process.
    Even I was facing the same problem and after I did Clean Solution - I could notice a quite a difference of improvement in the debugging speed !

  3. #3
    Join Date
    Mar 2008
    Location
    IRAN
    Posts
    811

    Re: Debugging Multithreaded Application

    it deponds on kind of synchronization you have used. for example performance of ReaderWriterLockSlim is better than ReaderWriterLock becuase of the bug in ReaderWriterLock. so tweeking your multi threading model can boos yourt performance.

    for example you can use Mutex and semaphore in the same place but in problems that semaphore is not necessary then Mutex is better choice.

    sometimes making types volatile can also have effect on performance when none-atomic operations gonna be done.

    it was good point you say use how many thread you use in your application?
    Please rate my post if it was helpful for you.
    Java, C#, C++, PHP, ASP.NET
    SQL Server, MySQL
    DirectX
    MATH
    Touraj Ebrahimi
    [toraj_e] [at] [yahoo] [dot] [com]

  4. #4
    Join Date
    Aug 1999
    Location
    Germany
    Posts
    2,338

    Re: Debugging Multithreaded Application

    Thanks for your replys. Cleaning the project helped a bit aynand reduced waiting time to half.

    I'm using about 200 threads with semaphores, because we need to handle more than one resource.

  5. #5
    Join Date
    Jul 2006
    Posts
    297

    Re: Debugging Multithreaded Application

    Debugging multi-threaded applications is hard. You can't really apply the same debugging techniques you're use to. I could give you a couple tips but these guys say it better, read this article they wrote about multi-threaded applications. I found it awhile ago when I started working with multiple threads and the advice has been invaluable.

    http://www.ddj.com/cpp/199200938?pgno=1

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)