![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2004
Posts: 18
Rep Power: 0
![]() |
Is there any way I can have a windowed app that also prints statements to the console? I'm having a hard time debugging my app, I'd just like to see some values printed to the screen in order to get some idea where its going wrong.
|
|
|
|
|
|
#2 |
|
Newbie
Join Date: Nov 2004
Posts: 24
Rep Power: 0
![]() |
The easiest way is to write all your debug messages to text file and 'tail -f' it
|
|
|
|
|
|
#3 |
|
Expert Programmer
|
Hrml, you know... with all the windows coding I have done I have never actually attempted to do anything like this, i would have just figured that you would cout or printf and it would appear on a relative console, though you might initially need to execute the program from the console or that text would get dumped into bit-oblivion... kind of like would be done on a linux system
I know that with C# you can just write to System.Console, even when in graphical mode, so there is likely a way to do it. Other options include writing to file, which is more commonly done since files can be stored, printed, and so forth. Actually if you goto my website the CMRLib project on my Projects has a VERY NICE logging class which I have opensourced and you can use for this purpose. Since the logging class was created so that it could be easily exported from a DLL file, there is a bit of a trick to actually initiating the interface.... psuedo-com like if you will, just look at the test project which initializes the interface in 2 lines of code... you will understand, it is very easy to work with, and comes in its own .lib file for easy importing to your project. My website: http://www.cliffordroche.com
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Nov 2004
Posts: 18
Rep Power: 0
![]() |
thanks guys, I will try your suggestions.
btw, i don't think cout or printf work for win32 apps or it didn't since last time I tried. I launched the app from the command line but no joy. ![]() |
|
|
|
|
|
#5 | |
|
Newbie
Join Date: Nov 2004
Posts: 12
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
|
|
#6 |
|
Newbie
Join Date: Nov 2004
Posts: 18
Rep Power: 0
![]() |
outputting to a file works great. thanks guys.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|