Click here to Skip to main content
15,885,366 members
Home / Discussions / C#
   

C#

 
AnswerRe: Nothing happens when CheckBox is checked Pin
NotPolitcallyCorrect9-Jan-17 8:17
NotPolitcallyCorrect9-Jan-17 8:17 
AnswerRe: Nothing happens when CheckBox is checked Pin
Richard MacCutchan9-Jan-17 22:30
mveRichard MacCutchan9-Jan-17 22:30 
QuestionC# Enumerable Repeat Pin
Pavlex48-Jan-17 4:01
Pavlex48-Jan-17 4:01 
AnswerRe: C# Enumerable Repeat PinPopular
OriginalGriff8-Jan-17 4:49
mveOriginalGriff8-Jan-17 4:49 
AnswerRe: C# Enumerable Repeat Pin
Pete O'Hanlon8-Jan-17 23:01
mvePete O'Hanlon8-Jan-17 23:01 
GeneralRe: C# Enumerable Repeat Pin
harold aptroot9-Jan-17 8:20
harold aptroot9-Jan-17 8:20 
QuestionVisual Studio Debugger Questions Pin
zequion7-Jan-17 21:15
professionalzequion7-Jan-17 21:15 
AnswerRe: Visual Studio Debugger Questions Pin
Slacker0077-Jan-17 21:22
professionalSlacker0077-Jan-17 21:22 
If you have two monitors, which you should, then drag the form into one monitor and observe the debugging in the other monitor(the one with the VS IDE running). This works for most forms and website debugging.

I have never needed to interrupt a debugging session....ever. Not to say that someone out there doesn't need to do this. I just isolate the code that needs to be debugged, and set breakpoints there, or start from the beginning of the code path, if I need to broaden my scope.

What I do is set a breakpoint close to where the action that I want to observe is going to take place and then run the application. use F10 to advance line by line, and F11 to step into methods. If you need to observe a collection or object variable then just right click on the variable and select Quick Watch...

Go to Youtube and search for .net VS debugging tips and how to videos, if you think that would help you learn more about this.

Edit: You can also use "Run to cursor" if you want to skip sections of code and not have to debug the code line by line. Just place your cursor somewhere further in the code path, and then right click and select run to cursor. I use this a lot to jump over loops or to skip larger areas of code that I don't need to see.

You can also drag the yellow arrow on the left side of the code viewer to a desired code path that has already executed, and repeat "most" code execution again, if needed. This is not good for all scenarios because variables and values can change during the first pass of the code execution. I use this sometimes when debugging Unit Tests, and I want to run the test again without stepping out of the debugger instance.

Also, look into conditional expressions when debugging as well - where applicable.

modified 8-Jan-17 3:36am.

GeneralRe: Visual Studio Debugger Questions Pin
zequion8-Jan-17 19:27
professionalzequion8-Jan-17 19:27 
GeneralRe: Visual Studio Debugger Questions Pin
Dave Kreskowiak9-Jan-17 2:52
mveDave Kreskowiak9-Jan-17 2:52 
GeneralRe: Visual Studio Debugger Questions Pin
zequion9-Jan-17 3:18
professionalzequion9-Jan-17 3:18 
GeneralRe: Visual Studio Debugger Questions Pin
Richard MacCutchan9-Jan-17 3:51
mveRichard MacCutchan9-Jan-17 3:51 
AnswerRe: Visual Studio Debugger Questions Pin
Jon McKee8-Jan-17 20:50
professionalJon McKee8-Jan-17 20:50 
QuestionCommon Variables in Main, Dlls, and Functions in .cs Pin
zequion7-Jan-17 21:11
professionalzequion7-Jan-17 21:11 
AnswerRe: Common Variables in Main, Dlls, and Functions in .cs Pin
Richard MacCutchan7-Jan-17 21:28
mveRichard MacCutchan7-Jan-17 21:28 
GeneralRe: Common Variables in Main, Dlls, and Functions in .cs Pin
zequion8-Jan-17 0:21
professionalzequion8-Jan-17 0:21 
GeneralRe: Common Variables in Main, Dlls, and Functions in .cs Pin
Richard MacCutchan8-Jan-17 1:28
mveRichard MacCutchan8-Jan-17 1:28 
GeneralRe: Common Variables in Main, Dlls, and Functions in .cs Pin
zequion8-Jan-17 5:42
professionalzequion8-Jan-17 5:42 
QuestionMocking Controller Methods Pin
Liagapi7-Jan-17 13:34
Liagapi7-Jan-17 13:34 
AnswerRe: Mocking Controller Methods Pin
Richard MacCutchan7-Jan-17 20:52
mveRichard MacCutchan7-Jan-17 20:52 
GeneralRe: Mocking Controller Methods Pin
Liagapi7-Jan-17 21:10
Liagapi7-Jan-17 21:10 
GeneralRe: Mocking Controller Methods Pin
Eddy Vluggen8-Jan-17 2:42
professionalEddy Vluggen8-Jan-17 2:42 
AnswerRe: Mocking Controller Methods Pin
Member 128317728-Jan-17 19:15
Member 128317728-Jan-17 19:15 
GeneralRe: Mocking Controller Methods Pin
Liagapi11-Jan-17 5:24
Liagapi11-Jan-17 5:24 
QuestionI want to replace number in two tag to double with regex in a file txt Pin
Member 105306516-Jan-17 5:16
professionalMember 105306516-Jan-17 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.