News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to use "watch"?

Started by TheUnusualGuy, October 16, 2019, 09:25:34 PM

Previous topic - Next topic

TheUnusualGuy

How do I use the "watch" feature in Windows?
I have the following line:
void exp10ToExp2(struct Number *pn)
My professor, who runs Linux, is able to right-click the "*pn" and select watch "pn".
However, I'm unable to do the same on Windows.
The following timestamped link shows my professor doing it. https://youtu.be/iEDFTMjyeWk?t=793
I've found the Watches window (Debug > Debugging windows > Watches) but it doesn't have the data filled out like it shows on my professor's screen.

oBFusCATed

Are you able to stop on a break point?
What is the result in the full debugger log (enable it in Settings -> Debugger)?
Do you see the watches window (Debug -> Debugging windows -> Watches)?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

TheUnusualGuy

#2
Quote from: oBFusCATed on October 16, 2019, 09:45:10 PM
Are you able to stop on a break point?
What is the result in the full debugger log (enable it in Settings -> Debugger)?
Do you see the watches window (Debug -> Debugging windows -> Watches)?
My professor said that a yellow triangle should appear on the breakpoint, but it doesn't.
Here's the debugger info, to save space on the thread: https://www.heypasteit.com/clip/0ITAFU. It appears to be the same message twice.
Screenshot of my code after pressing Debug/Continue: https://imgur.com/a/4z2TUiG
Yes, I can see the watches window, but my professor was able to do this: https://youtu.be/y73kULpEfxA?t=764 (it shows the fields already filled in when he presses "watch")

oBFusCATed

Quote from: oBFusCATed on October 16, 2019, 09:45:10 PM
What is the result in the full debugger log (enable it in Settings -> Debugger)?

You've not pasted the full debugger log...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

TheUnusualGuy

#4
Quote from: oBFusCATed on October 17, 2019, 09:07:52 AM
Quote from: oBFusCATed on October 16, 2019, 09:45:10 PM
What is the result in the full debugger log (enable it in Settings -> Debugger)?

You've not pasted the full debugger log...
Apologies.
https://www.heypasteit.com/clip/0ITAID
This is the full debugger log after running the debugger once.

TheUnusualGuy

Weird, I've also just realized that I'm unable to type anything in the command: field as well.

oBFusCATed


Starting debugger: C:\Program Files\CodeBlocks\MinGW\gdb32\bin\gdb32.exe -G -lines -2 -y C:/Users/glf4tim/Desktop/double1/double1/; -srcpath C:/Users/glf4tim/Desktop/double1/double1/; C:/Users/glf4tim/Desktop/double1/double1/bin/Debug/double1.exe
done

[debug]C:\Program Files\CodeBlocks\MinGW\gdb32\bin\gdb32.exe: unrecognized option `-G'
[debug]Use `C:\Program Files\CodeBlocks\MinGW\gdb32\bin\gdb32.exe --help' for a complete list of options.

Obviously this is your problem. I guess you've set some options to gdb which you shouldn't have done.
Inspect the options in Settings -> Debugger and remove the things that won't work.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

TheUnusualGuy

Quote from: oBFusCATed on October 17, 2019, 07:55:50 PM

Starting debugger: C:\Program Files\CodeBlocks\MinGW\gdb32\bin\gdb32.exe -G -lines -2 -y C:/Users/glf4tim/Desktop/double1/double1/; -srcpath C:/Users/glf4tim/Desktop/double1/double1/; C:/Users/glf4tim/Desktop/double1/double1/bin/Debug/double1.exe
done

[debug]C:\Program Files\CodeBlocks\MinGW\gdb32\bin\gdb32.exe: unrecognized option `-G'
[debug]Use `C:\Program Files\CodeBlocks\MinGW\gdb32\bin\gdb32.exe --help' for a complete list of options.

Obviously this is your problem. I guess you've set some options to gdb which you shouldn't have done.
Inspect the options in Settings -> Debugger and remove the things that won't work.
Thanks! It seems that I just had the wrong debugger type chosen!
Is this how the debugger log should appear to be? https://www.heypasteit.com/clip/0ITAK7

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]