Search
Get Started
C
C#
•
3y ago
shuffle
unable to call main method
Hi my program stops one line before the main method causing it to not run any help would be appreciated
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
Was this page helpful?
Yes
No
A
Angius
•
12/12/23, 11:56 AM
Program cannot stope before
because
is the entry point of the program
A
Angius
•
12/12/23, 11:56 AM
It
's quite literally the very first thing that gets executed
S
shuffle
OP
•
12/12/23, 11:56 AM
Why does nothing happen then
S
shuffle
OP
•
12/12/23, 11:56 AM
A
Angius
•
12/12/23, 11:57 AM
It seems you
're in the debugger
S
shuffle
Click to see attachment
D
dhoni7
•
12/12/23, 11:57 AM
you should step over using the debugger
A
Angius
•
12/12/23, 11:57 AM
Did you intend to run the debugger
?
S
shuffle
OP
•
12/12/23, 11:57 AM
I wanted to run the program
A
Angius
•
12/12/23, 11:57 AM
Well
, you ran the debugger
S
shuffle
OP
•
12/12/23, 11:57 AM
Can I run the program without compiling
?
A
Angius
•
12/12/23, 11:57 AM
And probably placed a breakpoint or some such
, which is why the code paused execution
A
Angius
•
12/12/23, 11:57 AM
No
A
Angius
•
12/12/23, 11:57 AM
C
# is a compiled language
A
Angius
•
12/12/23, 11:58 AM
It needs to be compiled
S
shuffle
OP
•
12/12/23, 11:58 AM
The thing is it would always work int he compiler
S
shuffle
OP
•
12/12/23, 11:58 AM
Till today
A
Angius
•
12/12/23, 11:58 AM
What compiler
?
S
shuffle
OP
•
12/12/23, 11:58 AM
Debugger
*
S
shuffle
OP
•
12/12/23, 11:59 AM
Is it because I
’m trying to perform file handling
?
A
Angius
•
12/12/23, 11:59 AM
Unlikely
S
shuffle
OP
•
12/12/23, 11:59 AM
Oh my
S
shuffle
OP
•
12/12/23, 11:59 AM
I found the breakpoint
S
shuffle
OP
•
12/12/23, 11:59 AM
I see thank you
S
shuffle
OP
•
12/12/23, 11:59 AM
Didn
’t know that was a thing
A
Angius
•
12/12/23, 12:00 PM
$debug
A
Angius
$debug
M
MODiX
•
12/12/23, 12:00 PM
https://docs.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-debugger?view=vs-2022
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger
, step through code
, and inspect data in a C
# application
.
A
Angius
•
12/12/23, 12:00 PM
Here you can read more about the debugger
A
Angius
•
12/12/23, 12:00 PM
Breakpoints and all
A
Angius
•
12/12/23, 12:00 PM
But if you just want to run your code
, you don
't need to run it through the debugger
S
shuffle
OP
•
12/12/23, 12:03 PM
What
’s the better way to donut
S
shuffle
OP
•
12/12/23, 12:03 PM
Do it
S
shuffle
OP
•
12/12/23, 12:03 PM
Compile it into an end
?
A
Angius
•
12/12/23, 12:03 PM
Just
.
.
. run it
S
shuffle
OP
•
12/12/23, 12:03 PM
Exe
A
Angius
•
12/12/23, 12:03 PM
No
, run the code
A
Angius
•
12/12/23, 12:03 PM
Green arrow in the top toolbar
S
shuffle
OP
•
12/12/23, 12:03 PM
Ohhhh
S
shuffle
OP
•
12/12/23, 12:03 PM
Thank you
A
Angius
•
12/12/23, 12:04 PM
Or
shortcut
A
Angius
•
12/12/23, 12:04 PM
Assuming you
're using VS 2022
S
shuffle
OP
•
12/12/23, 12:04 PM
F5 opens debugger for me
A
Angius
•
12/12/23, 12:04 PM
Ah
,
then
S
shuffle
OP
•
12/12/23, 12:04 PM
Alright
S
shuffle
OP
•
12/12/23, 12:04 PM
Also I just learnt about file handling
S
shuffle
OP
•
12/12/23, 12:05 PM
This is my code
S
shuffle
OP
•
12/12/23, 12:05 PM
S
shuffle
OP
•
12/12/23, 12:05 PM
S
shuffle
OP
•
12/12/23, 12:05 PM
But I get the error could not find part of the path
A
Angius
•
12/12/23, 12:07 PM
Protip
: you can screenshot your screen
S
shuffle
OP
•
12/12/23, 12:07 PM
Im at college
Next page
Main()
Main()
Main()
Main()
F5
F5
Ctrl+F5
Ctrl+F5