View Single Post
 
Old June 8th, 2013, 01:06 PM
John S John S is offline
Authorized User
Points: 179, Level: 3
Points: 179, Level: 3 Points: 179, Level: 3 Points: 179, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default DeBugging the Code Problem Resolved, Finally

I guess I ddn't explain my problem correctly in my Lesson 12 Try It! note.

I just now watched your video of Lesson 12 on the DVD, and you have the same situation that I do.

In your video, you set a Breakpoint, then run the Program, which brings up the Banquet Planner form.

At this point, notice that the program has stopped at the Breakpoint, but none of the code is highlighted in yellow, and the "Locals" window has not appeared.

Then you say " .. here's the program again, I'll click the button.." at which time you click on the Calculate button.

Now the form disappears to the background and the code is highlighted yellow and can be stepped through.

My confusion was that I thought the code would be highlighted in yellow when the Breakpoint is reached, and the program is displayed. I didn't realize that you have to click something in the program to make it continue, before the code gets highlighted!

The text in the book says "When the code is stopped, you can hover the mouse over a variable to learn its value".

Fine, but I thought that "when the code is stopped" meant WHEN it hits the Breakpoint, not AFTER it hits the Breakpoint and you RESTART it by clicking on a button in the program!

This may seem a minor quibble, but I have sat here for hours wondering why my code did not highlight in yellow when it hits the Breakpoint.

It doesn't highlight until you stop the code at the Breakpoint, and THEN RESTART IT!