Home » Tutorials » C# » Attach Console with WPF application

Attach Console with WPF application

Concat First Middle and Last name in Sql
Rebuild and Reorganize Indexing Sql Server Scripts

Attach Console with WPF application

Today I am going to explain Attach Console with WPF application.

Problem: Sometime developer wants to know regarding some of variables value on clients machine while one’s application is running or wants to check execution steps.

Solution: Developer can attach console to see real time execution or use Logger for future use. We will see first concept in action as of now and we will discuss Logger concept some another day.

Let’s have look into code, how could we Attach Console with WPF application!!

In WPF application we will write our below code in App.xaml  and App.xaml.cs

App.xaml code snippet is as below, we will add Startup=”Application_Startup”:


App.xaml.cs code snippet is as below:


Output for  Attach Console with WPF application:

Attach Console with WPF application

Attach Console with WPF application


Hey folks hope you have enjoyed this post and learnt something new concept.


Hello friends, My self Dhruv Sheth, I have more than 6 years of Industrial experience as a Software Developer. In my career I got chance to work with asp.net, c#,Web API, JavaScript, JQuery, WPF, WCF , Windows Application, PostScript, vb.net, GhostScript etc. So I have decided to share my knowledge with everyone and finally I have come up with TechnoThirsty.

Leave a Reply

Your email address will not be published. Required fields are marked *


Time limit is exhausted. Please reload CAPTCHA.

The content is copyrighted to technothirsty.com and may not be reproduced on other websites without permission from the owner.You may contact us using the information below.