Log in

View Full Version : about Visual Studio .NET 2003


Hero
April 6th, 2005, 09:59
Hi all
I need some help with VS .NET 2003.I writing a program in simple VC++ using this
IDE,and I want to now that can I set a memory breakpoint for my program using it
or not?Beacuse memory and hardware breakpoints are very usefull for debugging but
I can't find them in embedded debugger in VS .NET 2003.
Do you know anyway to use these breakpoints?Is there any plugin or option that be
able to do this?

sincerely yours

JMI
April 6th, 2005, 11:12
How about YOU starting with some homework of your own. Try something like "memory breakpoints + VS .NET 2003" (without the quotes) in your favorite search engine. After that try something like "hardware breakpoints + VS .NET 2003" (again, without the quotes) and if you get really desperate, try rtfm.

Regards,

bilbo
April 7th, 2005, 02:36
Well, JMI,
I was interested to the problem too some time ago, but unfortunately if you google "memory OR hardware breakpoints" "VS .NET 2003"
(which means to combine both searches "memory breakpoints"+"VS .NET 2003" and "hardware breakpoints"+"VS .NET 2003" you will not find anything.

rtfm could someway help (or better: Debug->New Breakpoint->Help button) but the explanation is not so exhaustive.

This is what I found out myself.
With the Visual Studio debugger (version 7: use the command line devenv /debugexe; version 6: use the command line msdev) you can put ONLY hardware breakpoints on memory writes: set them through the dialog box New Breakpoint->Data.

Quote:
Is there any plugin or option that be able to do this?

The plugin idea is smart, and is teoretically possible, but not yet implemented... By the way, Visual Studio has a powerful plugin interface, but almost nobody knows it!
You will find some interesting work in this direction at address
http://codeproject.com/macro/vsedebugaddin.asp

Best regards, bilbo

Hero
April 7th, 2005, 04:49
Thanks bilbo
This was great!
I should try to write some like plugin for it to these breakpoints.

sincerely yours

JMI
April 7th, 2005, 10:17
The point of course, as I pointed out in the second post that Hero made within a few minutes of eachother, was that he did not post anything which would indicate that he had attempted to do anything to try to help himself or research his own problem before posting his question here. Had he posted anything which indicated he had tried to find the answer and found nothing useful, I would not have suggested to him that he try that first. A simple phrase, such as "I have searched for an answer but didn't find anything useful" goes a long way.

For example, using VS .NET 2003 + memory breakpoints I quickly found references to a book titled:

"Debugging Applications for Microsoft® .NET and Microsoft Windows®"

Which was reviewed here: http://www.stolin-software.com/04booklist/0-7356-1536-5.html

and contains index references, such as:

WDBG: A Real Debugger 190
Reading and Writing Memory 192
Breakpoints and Single Stepping 195
Symbol Tables, Symbol Engines, and Stack Walking 200
Step Into, Step Over, and Step Out 209
So You Want to Write Your Own Debugger 210
What's Next for WDBG? 211
5 Advanced Debugger Usage with Visual Studio .NET 213
Advanced Breakpoints and How to Use Them 214
Breakpoint Tips 215
Quickly Breaking on Any Function 217
Location Breakpoint Modifiers 224
Multiple Breakpoints on a Single Line 227
The Watch Window 228
Calling Methods in the Watch Window 230
The Set Next Statement Command 232
...
7 Advanced Native Code Techniques with Visual Studio .NET 269
Advanced Breakpoints for Native Applications 269
Advanced Breakpoint Syntax 270
Breakpoints on System or Exported Functions 271
Conditional Expressions 274
Data Breakpoints 277

All of which seemed like they might help.

Comments on the "Windows Marketplace" which stated: "Programming is tricky, but with Visual Studio's superb debugging tools, you can iron out the bugs efficiently. Using memory watching breakpoints for example, you can catch the line of C++ that corrupts a variable."

There is a powerpoint presentation titled: "Debugging and Tracing .NET Applications" at techrepublic.com.com/5102-22-1058825.html

and at least 10 other pages of references which Hero did not indicate he had checked or even thought to review. I did not take the time to read all of them, but they certainly suggested that Hero had not reviewed the available information. This is why "Searching" for the answers is required by our Rules and why I remind people that is what they should try "first."


Regards,