Debug event from a thread to another

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Q2xhdWRl?=

    Debug event from a thread to another

    I start a thread when clicking on a button to synchronize data from within my
    MainForm. In the threaded method, I fire an event to ask stuff to my
    controler.
    When I run the application, it works fine. But when I try to debug, it fails.
    I put a breakpoint in the method that handles the event from within my
    controller. When the event is fired, the IDE breaks : Visual Studio than says
    that it cannot show objects values. Why ? And when I press F10 to continue
    debugging regardless of the objects values nothing happens ! The application
    is frozen ! Why ?

    Why is it working when running, but not when debugging ?

    One thing I need to mention is that the event is set in the UI thread, but
    fired within the working thread. Also, if I set the event within the working
    thread, before firing, it works fine in debug mode.

    How can I set the event from the UI thread and fire it from within a working
    thread and be able to trace it in debug mode ?

    (Sorry my english is a bit rusty)

    Thanks,
    Claude


Working...