Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7527511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:07:31+00:00 2026-05-30T04:07:31+00:00

When using using System.Diagnostics; and Debug.WriteLine(Test); having run the application, no Test can be

  • 0

When using

using System.Diagnostics;

and

Debug.WriteLine("Test");

having run the application, no “Test” can be seen in output. But if I use the msgbox function instead, the msgbox pops up, so the line is reached.

Am I looking in the wrong window or what do I have to change?

I am using VC# Express.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:07:33+00:00Added an answer on May 30, 2026 at 4:07 am

    There are two likely causes for this behavior

    • The application is being compiled in Release mode and the Debug.WriteLine call is not in the final program
    • There is no trace listener in the program and hence nothnig to output the message

    The easiest way to diagnose this is to change the code to

    #if DEBUG
    Console.WriteLine("the message");
    #endif
    

    If it prints then you have an issue with the trace listeners, else you’re compiling in Release

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to debug a C# application. The method: System.Diagnostics.Debug.WriteLine(something); should do the work,
Consider the following C# program: using System; using System.Diagnostics; namespace Test { class MainClass
I'm wanting to start a WPF application using caliburn.micro so I can use TDD
What is different between using #if (DEBUG) and System.Diagnostics.Debugger.IsAttached in visual studio? Are there
I've got a program that spawns two other proccesses using System.Diagnostics.Process . Their output
I'm using System.Diagnostics.ProcessStartInfo to set up the parameters for launching a process from a
It's common knowledge that using System.Diagnostics.Process.Start is the way to launch a url from
I am trying to call a process using System.Diagnostics.Process, send it a parameter, just
I have a simple Tray icon program that opens a site using System.Diagnostics.Process.Start(URL) And
I have the following code: using System; using System.Diagnostics; using System.IO; using PdfSharp.Pdf.Printing; namespace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.