locked
Console is not displayed when start with debugging option is clicked in the project RRS feed

  • Question

  • I have the simple code to print "helloworld" in the console. This is displayed in the console when we build the solution and then click start without debugging. But the same is not happening when start with debugging option is clicked, the console just appears and exits in a fraction of second. I dont think this is the issue with debugger because I could set the breakpoint and break at the console.writeline("Helloworld") statement.

    One more thing i tried the same for simple windows forms application(with a button inside) which runs with both the options and displays the windows form with button. So I feel there is nothing wrong with the debugger.

    Don't understand what the issue is.Please let me know what the issue is.

    Below is the code i have.

     

    namespace HelloWorld

    {

        class Program

        {

            static void Main(string[] args)

            {

                Console.WriteLine("HelloWorld");

            }

        }

    }

     

    Below is the text displayed in the output window when i run the above code.

     

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Users\murali.k\Documents\Visual Studio 2008\Projects\HelloWorld\HelloWorld\bin\Debug\HelloWorld.vshost.exe'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'

    The thread 0x784 has exited with code 0 (0x0).

    The thread 0xb50 has exited with code 0 (0x0).

    The thread 0xe8c has exited with code 0 (0x0).

    The thread 0x1a1c has exited with code 0 (0x0).

    'HelloWorld.vshost.exe' (Managed): Loaded 'C:\Users\murali.k\Documents\Visual Studio 2008\Projects\HelloWorld\HelloWorld\bin\Debug\HelloWorld.exe', Symbols loaded.

    The thread 0x1a74 has exited with code 0 (0x0).

    The thread 0x10fc has exited with code 0 (0x0).

    The program '[3732] HelloWorld.vshost.exe: Managed' has exited with code 0 (0x0).

    Thanks in advance.

     

     

    Saturday, January 7, 2012 4:26 PM

Answers