473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Feb 28 '08 #1
0 1147

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mark | last post by:
Hi, I'm looking for some ideas on how to build a very simple Event processing framework in my C++ app. Here is a quick background ... I'm building a multithreaded app in C++ (on Linux) that...
21
by: Alo Sarv | last post by:
Hi From what I have understood from various posts in this newsgroup, writing event loops pretty much comes down to this: while (true) { handleEvents(); sleep(1); // or _sleep() or...
1
by: Sweta | last post by:
How do I post a message to the main thread from another thread in the catch block? I am trying to do this: try { //generate an exception from another thread } catch() { //fire the event to...
5
by: Iain | last post by:
I've an application I've been working on for some time which has a Windows Forms User interface, a set of 'business object' classes and interacts with a SQL Server database and some Legacy COM...
5
by: Carlo Marchesoni | last post by:
From an aspx page (A.aspx) I open another one (B.aspx - for table lookup). When the user selects an entry in B.aspx I would like to force a button's event in A.aspx to be fired. I guess the only...
19
by: Heidi Hundåla | last post by:
Hi ! I have a Wep App in C#. Page_Unload fires after Page_Load, and it seems totally unreasonable when you want to use this event when you _leave_ the page. In my project we wanted to use...
3
by: =?Utf-8?B?THVib21pcg==?= | last post by:
Hi, I have an app with the main thread and one additional thread. In the main thread I defined an event handler MyHandler, the function for raisin this event OnMyEvent and the function for...
2
by: Spam Catcher | last post by:
Hi all, I have a webservice which is throwing a 500 Internal Server Error. It seems to be related to the signature of function (or one of the properties within the function). The web service...
6
by: =?Utf-8?B?TWlrZVo=?= | last post by:
I have a thread that parser video-frame from network streaming. It can get up to 1000 frame/second. I want another thread to process video-frame. I can use RaiseEvent or Callback Function. My...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.