Monday, March 29, 2010 11:41 PM
I'm using VS2005 with SP1
I created a function which creates a dialog box that I intend to call in the debugger watch window (to visualize a complex data type). I cannot use the fancy managed debug visualizers as it's native code.
The problem is that the debugger will time out if the user doesn't close the dialog box after 5 seconds and terminate my function and the dialog box becomes inactive. So I create a new thread in that function which will create the dialog box. But when my function finishes my dialog box becomes unresponsive.
I suppose that when a function called by the debugger finishes, any threads it created is terminated too ? How can I get my dialog box to stay active even when my function finishes and gives the control back to the debugger ?
I'm sure I've seen that working in my previous job, but I never looked at how they did it.
Tuesday, March 30, 2010 7:01 AMModerator
Thanks for your post.
"I suppose that when a function called by the debugger finishes, any threads it created is terminated too ?"
I think it is right.
"How can I get my dialog box to stay active even when my function finishes and gives the control back to the debugger ?"
I'm not sure what do you want to implement, hope the following Debugger APIs could help you.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework!
Wednesday, March 31, 2010 8:08 AM
Thanks for the answer.
Basically I want to create a custom data visualizer for a native c++ data structure, similar to the functionality in Microsoft.VisualStudio.DebuggerVisualizers for managed code. Modifying autoexp.dat wouldn't be enough for my purposes (I want a full blown dialog box with gdi drawing).
I didn't know about the Visual Studio Debugging SDK. Do you think I could implement what I want using it ? It looks pretty abstract to me. Could you point me in the direct direction please ? Or any other way ?
Saturday, February 18, 2012 2:15 AM
How did you manage to call your dialog box function? From which function did you call your_dialogbox_function?