Why is my C# debugger running too fast on GitHub?

0
5
Asked By CuriousCoder93 On

I'm taking an intro class and I'm having trouble with the debugging feature in C#. When I try to run the debugger, it executes the code so quickly that the watch feature pops up and disappears before I can read anything. I'm unsure why this is happening, and I don't have any classmates to ask for help. Any thoughts?

2 Answers

Answered By DebugDude42 On

Have you tried setting a breakpoint at a specific line? That way, the debugger will pause just before that line executes, allowing you ample time to inspect the program's state.

CuriousCoder93 -

Thanks man!!! That worked!!!

Answered By ConsoleKing88 On

It sounds like you're running into a console program issue where the console closes immediately after execution. A simple fix for this is adding `Console.ReadLine()` at the end of your program to keep the window open until you press enter.

CuriousCoder93 -

Not the output... that's showing up fine. Sorry if I'm not explaining this right, but you know how in GitHub you can debug and watch the program run? It just pops up and goes away too fast once the code is executed.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.