Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Diagnostics.Debug not working :-(

Diagnostics.Debug not working :-(

Scheduled Pinned Locked Moved C#
csharpvisual-studiocomdebugginghelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gvanto
    wrote on last edited by
    #1

    I am trying to output stuff from my program to the output window and have followed the simple instructions given by numerous sites: using System.Diagnostics; namespace myapp { class MyApp { static void Main(string[] args]) { Debug.WriteLine("Hello World!"); } } } When I do View -> Output Window (in Visual Studio), I get the output window but Hello World does not appear ?? Am i Doing something wrong ?? Help much appreciated! Regards Gerry Debug newbie Meet New People - Its Free! http://www.twoggle.com

    D S P 3 Replies Last reply
    0
    • G gvanto

      I am trying to output stuff from my program to the output window and have followed the simple instructions given by numerous sites: using System.Diagnostics; namespace myapp { class MyApp { static void Main(string[] args]) { Debug.WriteLine("Hello World!"); } } } When I do View -> Output Window (in Visual Studio), I get the output window but Hello World does not appear ?? Am i Doing something wrong ?? Help much appreciated! Regards Gerry Debug newbie Meet New People - Its Free! http://www.twoggle.com

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      Try using Console.WriteLine(...);

      Dave
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

      1 Reply Last reply
      0
      • G gvanto

        I am trying to output stuff from my program to the output window and have followed the simple instructions given by numerous sites: using System.Diagnostics; namespace myapp { class MyApp { static void Main(string[] args]) { Debug.WriteLine("Hello World!"); } } } When I do View -> Output Window (in Visual Studio), I get the output window but Hello World does not appear ?? Am i Doing something wrong ?? Help much appreciated! Regards Gerry Debug newbie Meet New People - Its Free! http://www.twoggle.com

        S Offline
        S Offline
        Scott Dorman
        wrote on last edited by
        #3

        Are you building a "Debug" build or a "Release" build. You can tell by looking at the toolbar in Visual Studio (assuming you haven't customized any of the toolbars, it's the "Standard" toolbar) and looking at the "Solution Configuration" dropdown. If it doesn't say "Debug", then your output will not dispaly as that line won't even be compiled in to the code.

        Scott Dorman

        Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]


        Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

        1 Reply Last reply
        0
        • G gvanto

          I am trying to output stuff from my program to the output window and have followed the simple instructions given by numerous sites: using System.Diagnostics; namespace myapp { class MyApp { static void Main(string[] args]) { Debug.WriteLine("Hello World!"); } } } When I do View -> Output Window (in Visual Studio), I get the output window but Hello World does not appear ?? Am i Doing something wrong ?? Help much appreciated! Regards Gerry Debug newbie Meet New People - Its Free! http://www.twoggle.com

          P Offline
          P Offline
          Pouriya Ghamary
          wrote on last edited by
          #4

          you must run your project with debug config mode by pressing F5 or click on play button

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups