VS.NET Tips & Tricks : Techniques to be more productive in VS.NET
Updated: 1/21/2005; 10:19:49 AM.

 








Subscribe to "VS.NET Tips & Tricks" in Radio UserLand.

Click to see the XML version of this web page.

 
 

Friday, August 16, 2002

Use the Object Browser to quickly view all methods, properties and events for classes

Select View->Other Windows->Object Browser (Ctrl+Alt+J)
10:02:29 AM    comment []

Wednesday, July 31, 2002

Viewing threads in debugger

Sometimes when breakpoints are hit or exceptions occur, you will notice that only a few threads will appear in VS.NET's Threads window, when you know that there should be more.  To view all threads in this case:

  1. Switch to the Call Stack window for any one of the threads.
  2. Double-click on one of the stack frames (preferably one that will force a source file to be loaded).
  3. Go back to the Threads window.

8:25:29 AM    comment []

How to set member variable breakpoints for unmanaged C++ objects while debugging both managed and unmanaged code

  1. Have VS.NET attach to the process you wish to debug by selecting Tools->Debug Processes...(Ctrl+Alt+p)
  2. When prompted for program types, make sure that "Native" is checked and "Common Language Runtime" is not checked  - Yes, this means that you can't debug managed code for this session
  3. Set a line breakpoint in the C++ code that references an instance of the object you wish to set a member variable breakpoint on (e.g. constructor) -  The easiest way to set breakpoints in source code is to positioning the cursor on the line to set the breakpoint and pressing F9 or by right clicking and selecting "Insert Breakpoint"
  4. After hitting the line breakpoint, if there is a reference to the member variable you wish to set a breakpoint for, right click on it and select "Add Watch".  If there is no reference then open a QuickWatch window (Shift+F9), find the member variable, then press the "Add Watch" button and finally close the QuickWatch window
  5. Go to the watch window where  the member variable was added and copy it to the clipboard
  6. Disply the "New Breakpoint" dialog by selecting Debug->New Breakpoint (Ctrl+b), select the "Data" tab, paste the member variable into the "Variable" edit field and then press OK - If you did not uncheck "Common Language Runtime" from step 2, you may get a dialog that says that the breakpoint can't be set, and that data breakpoints are not supported in the Common Language Runtime

8:20:17 AM    comment []

© Copyright 2005 Paresh Suthar.



Click here to visit the Radio UserLand website.
 


January 2005
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Aug   Feb