Debug freeze with TextBox.EnterPressed Event.

Debug freeze with TextBox.EnterPressed Event.

RPTHOMAS108
Mentor Mentor
464 Views
2 Replies
Message 1 of 3

Debug freeze with TextBox.EnterPressed Event.

RPTHOMAS108
Mentor
Mentor

Hello All

 

What I am finding is that when I put a break point within the code that handles TextBox.EnterPressed event that the Debug session freezes and eventually arrives at the below message.

 

I would like to know what is causing this and if it is just something I am experiencing or is a general more widespread problem. This is a case of something that works as long as you don't debug it. The help link on the message box suggests certain things I've tried but I don't get this problem except for the handling of this specific event (so what is special about it)?

 

The project files are attached.

 

201103.png

0 Likes
465 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

To mitigate this and numerous other problems, I would recommend avoiding all kind of user interaction in connection with debugging anything at all unless it is completely trivial. A Windows message box and a Revit TaskDialog have complex interactions with messages and threading and stuff. Whenever I run into a problem with such an interaction, I switch to logging the required debugging information to the Visual Studio debug window (only a little better) or to a completely separate text file (much better).

 

Sorry if that does not address your question at all!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

RPTHOMAS108
Mentor
Mentor

Hello Jeremy

 

Originally I didn't have the TaskDialog but I experienced the same issue. It's not a major problem for me I was just wondering if it was just me getting the issue or is a common problem with this event. Also if there was a better way of subscribing to it?

 

Regards

 

Richard 

0 Likes