Visual Studio 2019 can't write to Output window

Manny 151 Reputation points
2022-01-30T01:43:59.02+00:00

Hi
I am using Visual Studio 2019 to create SSIS package. I am using C# to write the script. I need to troubleshoot the script so I am using print statements to see what the variable values are. I cannot get anything to show up in the Output window. I tried this statement:

System.Diagnostics.Debug.WriteLine("hi debug");
Console.WriteLine("hi console");

Neither works.

Any suggestions on how to get this working?

Thank you

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
945 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,801 Reputation points Microsoft Vendor
    2022-01-31T07:51:38.733+00:00

    Hi @Manny ,

    Welcome to Microsoft Q&A!

    Please update your VS2019 to the latest version and repair it through VS Installer > More > Repair.

    Then, go to Tools > Options > Debugging > General and check if the “Redirect all Output Window text to the Immediate Window” is unchecked.

    After that, reboot your VS and create a new project to verify if it works or not.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.