Solved

c# Console windows in a WPF application

Posted on 2011-03-09
2
1,157 Views
Last Modified: 2013-12-17
I've searched the internet and found that it appears to be impossible to open a console window with a windows WPF application.  I'm hoping that someone knows a work around or knows another way to do this.

I've got an application that I want to debug.  In programming with linux or many other languages I would just put in a printf and dump variable information to let me know how far an application has made it.

In my app I use a background worker process and it works great in my lab and a couple of other places but at one location it just sits.  My ideal world would be to open a console window and dump information from the process to the window as it goes.  

Since I'm using a background worker, it's not easy to even put in a label and update the label with what is going on.  And since I don't have visual studio on this production server I can't compile and run it there and access breakpoints.

Anyone have an idea on how I can debug in this environment?

Thanks.
0
Comment
Question by:sej69
2 Comments
 
LVL 14

Accepted Solution

by:
athomsfere earned 500 total points
ID: 35085038
How about use WriteLine a StreamWriter to write the output to a txt file? After the hang or crash just open the text file and look?

Seems to be the easiest, straightforward thing I can think of, with very similar results.
0
 

Author Closing Comment

by:sej69
ID: 35087399
Awesome.  That was a GREAT idea.  Helped me find my issue.  Thanks again!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PrintingFoundIt(Almost!(Damn!)) 1 27
help with regular expression to search string 6 27
REXEX help Part 2 2 25
Create a WebAPI using a generic return parameter 9 25
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question