Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,679 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,206 people online right now. Registration is fast and FREE... Join Now!




debugging

 
Reply to this topicStart new topic

debugging

almotions
post 31 Aug, 2007 - 09:09 PM
Post #1


New D.I.C Head

*
Joined: 29 Aug, 2007
Posts: 4


My Contributions


hi,'m using visual studio 2005
i've written a simple C++program like this
CODE
int main()
{
int a[2]={1,2};
cin.get();
}


and run it and i wish to use the watch tool to see the contents of my allocated memories.But i can't use the watch tool eventhough it's there.Please advice.
User is offlineProfile CardPM

Go to the top of the page

Xing
post 31 Aug, 2007 - 09:28 PM
Post #2


D.I.C Addict

Group Icon
Joined: 22 Jul, 2006
Posts: 723



Thanked 2 times

Dream Kudos: 1575
My Contributions


QUOTE(almotions @ 1 Sep, 2007 - 10:39 AM) *

hi,'m using visual studio 2005
i've written a simple C++program like this
int main()
{
int a[2]={1,2};
cin.get();
}

and run it and i wish to use the watch tool to see the contents of my allocated memories.But i can't use the watch tool eventhough it's there.Please advice.

Visual C++ Debug Tutorial
User is offlineProfile CardPM

Go to the top of the page

Martyr2
post 31 Aug, 2007 - 09:45 PM
Post #3


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 5,062



Thanked 175 times

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions


Simply set a break point at the beginning of the program and step through it using F11. You will be able to see your variables being set and everything. smile.gif

Btw Xing, that link is for the old debugger, he specifically said 2005.
User is offlineProfile CardPM

Go to the top of the page

Xing
post 1 Sep, 2007 - 01:37 AM
Post #4


D.I.C Addict

Group Icon
Joined: 22 Jul, 2006
Posts: 723



Thanked 2 times

Dream Kudos: 1575
My Contributions


QUOTE(Martyr2 @ 1 Sep, 2007 - 11:15 AM) *

Btw Xing, that link is for the old debugger, he specifically said 2005.

I don't use any version of visual studio any more but AFAIR there's not much of change in basic debugging techniques.
User is offlineProfile CardPM

Go to the top of the page

almotions
post 1 Sep, 2007 - 05:33 AM
Post #5


New D.I.C Head

*
Joined: 29 Aug, 2007
Posts: 4


My Contributions


QUOTE(Martyr2 @ 31 Aug, 2007 - 10:45 PM) *

Simply set a break point at the beginning of the program and step through it using F11. You will be able to see your variables being set and everything. smile.gif

Btw Xing, that link is for the old debugger, he specifically said 2005.


I've tried setting a breakpoint at the start and running the program but the weired thing is i can't use any of the step functions as well as the quickwatch.They are all not "clickable".Is there something wrong with my settings or something else?Thanks
User is offlineProfile CardPM

Go to the top of the page

1lacca
post 1 Sep, 2007 - 05:49 PM
Post #6


code.rascal

Group Icon
Joined: 11 Aug, 2005
Posts: 3,822



Thanked 11 times
My Contributions


Maybe you should start it with debug and not run.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/23/08 06:38AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month