Open Windows Console on Blazor Server App Start VS2019

Felicity Winter 21 Reputation points
2021-04-18T00:33:05.077+00:00

I'm developing a Blazor Server App which interfaces with an API I have built.

At one point, my project was set up to open a Windows Console output window which showed essentially the same info as the Output window in VS but also the content of my Console.Writeline() commands as well. I'm not sure if this stopped as a result of a change I have made to the environment or the project settings but that Windows Console window no longer launches when I debug my app in VS.

If anyone knows what I'm referring to, has had it and solved the issue or knows the way back I would love to hear from you. It's been driving me insane with frustration! It was my go-to debug solution!!

Thanks everyone.
Flic

Developer technologies .NET Blazor
Developer technologies Visual Studio Debugging
Developer technologies .NET .NET CLI
0 comments No comments
{count} votes

Accepted answer
  1. Dylan Zhu-MSFT 6,426 Reputation points
    2021-04-19T07:09:23.293+00:00

    Hi FelicityWinter,

    You can go to Project Properties > Application, then check if the output type is Console Application.

    Best Regards,
    Dylan


    If the answer is helpful, please click "Accept Answer" and upvote it.
    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.**

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Felicity Winter 21 Reputation points
    2021-04-22T09:40:19.43+00:00

    Dylan you have actually resolved my original issue for me with your answer. I can expand on your solution after further experimenting.

    My issue: One solution containing two projects, a Net Core Web API and Blazor Server Client. At one point when I debugged my solution with both apps starting, a console window would open allowing me to write debug messages from my server client to it. After a Windows Insider update and new VS builds I could not replicate my previous experience and I have seen numerous cries for help on the same issue online.

    The fix care of Dylan: The project inside your solution that you wish to have an accompanying console window for should be run as shown in Dylan's screenshot above. This will invariably open a console output window. It appears that so long as you do this the first time, you can then set your multiple projects to start up and the console window will load for the desired project or remain open from the previous debug and continue on.

    Note: I have not tested this across multiple projects but have replicated my description above several times after rebooting.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.