Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 6th, 2013, 01:16 PM
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 Lesson 12 Try It!

The Step-by-Step, and also the section on "Reading Variables" pg 153 did not work for me at all.

Using the Express Edition, I had to:

1) Set a Breakpoint, as you noted.

2) Run the program (start DeBugging)

3) The program stops at the Breakpoint and pops-up the form.

4) Press the Enter key on the keyboard. This highlights the code in yellow, and opens the Locals window.

5)NOW you can hover the mouse to see the values of the variables, or press
F10 to step through the code.

**Update:

Even this does not work in all cases.

In Lesson 12, Ex 2 (Celsius to Fahrenheit), setting a Breakpoint next to :

"private void celsiusButton_Click"

and pressing DeBug does not open the Locals window unless I click the Celsius "Go" button in the form.

Last edited by John S; June 6th, 2013 at 03:35 PM.. Reason: update
  #2 (permalink)  
Old June 6th, 2013, 04:12 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Hi John,

I'm sorry this didn't work as expected and that it sometimes seems inconsistent.

I don't know why you would need to press Enter. My system doesn't do that.

The bottom line is, when the program is stopped you can hover over variables to learn their values. Depending on the line where you set the breakpoint, all I can figure is the program is stopping in slightly different ways.

For example, if you set a breakpoint on a variable assignment (like x = 10), then it should stop before executing that line.

If you try to set a breakpoint on the declaration for a method, it probably sets the breakpoint on the "{" after the declaration.

Sometimes you may need to press F10 to step over a line of code before you can work with the variables in that line.

Visual Studio won't let you set breakpoints on some statements such as comments because the compiler actually strips them out before running the program because they don't really mean anything to the program, just to you.

The Locals, Autos, and other windows may not appear automatically so you may need to display them yourself when you want them. If they're missing and you want them, look in the Debug menu's Windows submenu. (I usually hide those windows and just hover over variables to see their values.)

Unfortunately I can't tell exactly what you'll see in your installation because Visual Studio is highly configurable so your installation may not look quite like mine or anyone else's.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
  #3 (permalink)  
Old June 6th, 2013, 07:28 PM
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

Thanks, Rod ...

It's probably something to do with Express Edition, which is why you don't see the problem.
  #4 (permalink)  
Old June 7th, 2013, 01:02 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

Quote:
It's probably something to do with Express Edition, which is why you don't see the problem.
Possibly. I'm always a bit suspicious of things like this. Most of the differences between the Express Edition and other editions involve which tools are available (for example, the team foundation tools and icon editor are not in the Express Edition) or configuration issues (such as the Immediate window being hidden in the Express Edition).

But Visual Studio is an extremely complicated program and they fiddle with it constantly so it could be a bug, a difference in the editions, or just a case of us not knowing what it is "thinking."
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lesson 12, Step 5: Question about Interface klp1958 BOOK: iPhone and iPad App 24-Hour Trainer 1 January 11th, 2014 04:47 PM
Lesson 12 mrubin78 BOOK: JavaScript 24-Hour Trainer 5 June 21st, 2013 10:01 AM
Lesson 12 - Ping Pong Game won't run threads Scott.Ballenger BOOK: Java Programming 24-Hour Trainer by Yakov Fain 2 April 27th, 2013 10:21 PM
want to convert date from 01/12/07 to 12-Jan-2007 hurperl Perl 1 April 12th, 2007 05:47 AM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM



All times are GMT -4. The time now is 02:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.