473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# debugging help

17
Hi. I apologize in advance if this is in the wrong forum.
I am totally new to debugging my code, and the tools available. Previously, all I did was manually trace my code. However, doing that with my current problem would take way too long.

I have an object (obj A) with an attribute. I check the value of the attribute, before I add the object "into" another object (obj B). The value is correct (expected). Then I do a buncha stuff. Then, I print the contents of obj B to a stream. It is here where I notice the value of the attribute of obj A is incorrect, and has changed. So I need a way to find out where it has changed, obviously it is somewhere after I add obj A into obj B, and before I dump the contents of obj B into a stream, but tracing it is a nightmare.

What is an easy way to find out exactly where/when the value of that attribute changed? Are there any good debugging tutorials for beginners?

Thank you for any help or advice!
Oct 24 '07 #1
2 963
Shashi Sadasivan
1,435 Expert 1GB
Just where you said that you "do a bunch of stuff" ... - you probably are using some methods in that object type of B to change the value of A.

Put a breakpoint over there.

So everytime it is callled, keep a track of it...
and the moment it changes, check the stack trace to see where it was called from.

going a bit ahead with it - you can even put a condition to your break point. So if you know that A is supposed to be 3, you can put the condition as A != 3, and it will break only if A is not 3.

cheers
Oct 24 '07 #2
zman77
17
Thank you.
Looks like I've found the problem.
Oct 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steve Wark | last post by:
I have a Windows 2003 Web server on which I was debugging remotely with no problems. I then moved this server to a different domain and now remote debugging will not work, the error is; ...
5
by: Don Hans | last post by:
Gents, Have .Net2003 Enterprise architect installed on a Win2k Server with IIS. Even logged in as administrator, I cannot run any ASP.NET app with debugging. I always get the error "Unable to...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
16
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the...
7
by: Frank | last post by:
I'm running a mixed ASP / ASP.NET environment. I can use the debugger in for the ASP.NET code, no problems. But when I turn on ASP Debugging for the project, I get the error message: "Error...
1
by: Michiel | last post by:
Hello, I use Visual Studio .Net 2003 Professional (Trial version) on Windows XP Professional (Dutch version). I have a Windows Server 2003 with IIS 6 (UK version). There is no domain, just a...
6
by: KevinGPO | last post by:
I am currently developing a website in ASP (VBScript) using MS Visual C#.NET IDE. I just create a new "ASP.NET Web Application" and point to my local webserver (IIS) of my website address. Then I...
5
by: phnimx | last post by:
Hi , We have developed a number of plug-in .NET Library Components that we typically deploy with our various applications by installing them into the GAC. Each of the applications contains an...
5
by: rn5a | last post by:
Can someone please suggest me a text editor especially for DEBUGGING ASP scripts apart from Microsoft Visual Interdev? I tried using Visual Interdev & created a project but Interdev generates...
2
jwwicks
by: jwwicks | last post by:
C/C++ Programs and Debugging in Linux This tutorial will give you a basic idea how to debug a program in Linux using GDB. As you are aware Visual Studio doesn’t run on Linux so you have to use...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.