Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# Debugging

Daniel Hildreth
Daniel Hildreth
16,170 Points

Introduction to Visual Studio Step Into/Step Over

So this may be a dumb question, but I am a little confused. In the Introduction to Visual Studio in the Debugging video, there are 2 methods, step into and step over. The video says you can step over whole bits of code without actually going into it using the step over method, whereas the step into method steps into every bit of code. Couldn't you just put your cursor where you want the step into process to begin and just do it that way to debug, or is that still different than the step over method?

1 Answer

Steven Parker
Steven Parker
231,110 Points

The code is still executed with "step over" but not if you move the cursor.

For example, if cursor is at a function, and you "step over", the function will be executed (without stopping), and the cursor will be shown on the next line. But if you move the cursor to the next line, the function will not be executed.