CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2005
    Posts
    178

    run without debug

    hi,
    i need to run my program without debug in order to get some more output to my console application.
    for example-
    the user enters "abc" so i want that the output will be "name:abc"
    and i need to do that while im runnign my program without debug.
    how can i do that?
    thanks

  2. #2
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: run without debug

    i need to run my program without debug
    If you want to run your application without the debugger attached you can either start it from the command prompt or (I am assuming Visual Studio) click 'Start without debugging' in the 'Debug' menu (Ctrl + F5).

    - petter

  3. #3
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: run without debug

    Quote Originally Posted by ppl1
    hi,
    i need to run my program without debug in order to get some more output to my console application.
    for example-
    the user enters "abc" so i want that the output will be "name:abc"
    and i need to do that while im runnign my program without debug.
    how can i do that?
    thanks
    Your question is kinda vague. Do you want to print something in the immediate window while your app is running. You can use
    Code:
    //this will be printed in the output window in the Visual Studio IDE
    System.Diagnostics.Debug.WriteLine ("Hello There");
    Last edited by Shuja Ali; January 16th, 2006 at 08:36 AM. Reason: Confused this thread with VB 6

  4. #4
    Join Date
    May 2005
    Posts
    178

    Re: run without debug

    and if i want it to be printed in the console?

  5. #5
    Join Date
    May 2005
    Posts
    178

    Re: run without debug

    ok i get that...
    thanks for the help

  6. #6
    Join Date
    Sep 2004
    Location
    Tehran(Ir)
    Posts
    469

    Re: run without debug

    Quote Originally Posted by ppl
    i need to do that while im runnign my program without debug.
    use Debugger.IsAttached property for determining if a debugger is attached to the process

  7. #7
    Join Date
    Mar 2000
    Location
    Germany, Franken
    Posts
    257

    Re: run without debug

    You could also use the functionality out of the System.Diagnostic.Trace class.
    It has a similar functionallity as the System.Diagnostic.Debug class. The advantage or disadvantage of the Trace class is that it also make output when you have a release build.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured