Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am having a hard time debugging my C# app in Visual Studio. I can't figure out how to debug code line by line, but not at the moment the program starts (because I would have to F5 a lot of times as the program takes about 200 lines just to initialize). I mean let's assume I would like the debugging to start in a certain moment. Something like having a breakpoint in every line of code but without actually creating the breakpoints (which would take a lot of time every time I want them to be created).

I hope I am somewhat clear.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
105 views
Welcome To Ask or Share your Answers For Others

1 Answer

I'm not entirely clear what you're after...

  • If you're not sure how to step line, by line, put a breakpoint where you want to start debugging line by line (or pause the app) then use F10 as "Step Over" or F11 as "Step Into" instead of F5 ("Go").

  • If you're not sure how to break into the app when you want to, you can hit the "pause" button in the debugger at any time, or add a breakpoint where you want to stop even after the app has started.

If neither of these is helpful, please give more information.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...