Home > Debugging, Visual studio > Quick VC debugging tip!

Quick VC debugging tip!

So you have a dialog while you are debugging an application and you don’t know from where this dialog is popping up, huh, how many time has this happened!

So what normally people do is goto debug menu, press break and then goto threads and then double click on each thread to view call stack and then they find out. This is fine if you have a modal dialog, but what if it’s modeless?

So here is the solution, to break into an application while it’s running press “F12”. Yeah “F12”, can’t believe your eyes, do and believe!

So in order to debug into modeless dialogs you need to be real fast in pressing F12 😉 . As soon as you start such a dialog press F12. This does the trick for me and must do for you too!

This same trick applies to any code that you are executing, at any time to break while debugging press “F12”. This doesn’t require visual studio to be running in the foreground. The foreground application should be the application that’s being debugged. After breaking into the process, continue as you would normally to find out where exactly and in which thread the execution is taking place.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: