You are running a Console app, not a WinForm app, so your ConsoleApp project is "Set as Startup Project". So, if you have a WinForm project, the WinForm project should be "Set as Startup Project".
How to debug my design form project?
Hi
when I am start my debugging the cmd open and close immediately without showing the output of my design form.
It show the program has exited with 0 code like this:
'ConsoleApp1.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'ConsoleApp1.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\Venky\source\repos\ConsoleApp1\bin\Debug\ConsoleApp1.exe'. Symbols loaded.
The program '[13592] ConsoleApp1.exe' has exited with code 0 (0x0).
I don't know what mistake I have made. pls anyone tell me what to do for this.
2 additional answers
Sort by: Most helpful
-
Castorix31 85,131 Reputation points
2020-08-19T11:41:04.007+00:00 If it is a Console application (as you called it ConsoleApp1.exe), add :
Console.Read(); or Console.ReadLine(); -
K. MOHANA PRIYA 56 Reputation points
2020-08-25T13:10:47.443+00:00 Sir, I have already added Console.ReadLine();. Eventhough it doesn't show the output properly.
Also I have a doubt. Is there any need to change in the project property regard to debug?It showing like this:
'ConsoleApp1.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\Users\Venky\source\repos\ConsoleApp1\bin\Debug\ConsoleApp1.exe'. Symbols loaded.
'ConsoleApp1.exe' (Win32): Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll'. Symbols loaded.
'ConsoleApp1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Symbols loaded.
The thread 0x4df4 has exited with code 0 (0x0).
The thread 0x40e0 has exited with code 0 (0x0).
The thread 0x3ff0 has exited with code 0 (0x0).
The thread 0x1ff8 has exited with code 0 (0x0).
The thread 0x1444 has exited with code 0 (0x0).
The program '[18532] ConsoleApp1.exe' has exited with code 0 (0x0).For your concern that I did a simple queue program and it executed the output correctly but for this form design program it doesn't show the output properly.
Have I need to change any settings before debugging?