How to make output visible while running the code from VS? - visual-studio

I can see the output window with logging information only when I stop/exit the application. How to make it visible while running the code from VS?

Open Output window before or while running the application (View -> Output or ALT+2).

Related

Redirect windows console output from another process to file

I have a DLL which does as plugin into the TS3 client.
The problem is, the plugin provokes a crash that I cannot seem to find in my code directly.
So my idea is to set the Console Output of the console windows in the background (-console option) to a file, because when the program crashes there is no way I can read the console output as the console disappears immediately.
Is there a way to set the output of a crashing console to a file?
Because so far, when using the stdout operator (ts3client_win64 -console > output.txt) it does not write anything to the file. (I assume it cannot close the file handle and loses all its data?) But I want to keep the console output when the crash occurs.
It also has to be said that I can not just run it with a batch file and a pause statement, because when starting the application it opens its own console window (and thats the one of which I want the output).
It is the type of crash one would get from failed (safe) string operations in C like strtok_s or strcpy_s.

VS Console window does not show all results

I am using VS express 2012 to run a code that display content of many files. I found that first files content do not show and when I debug step by step I found that the content show on the console window and disappear when other results show, which means they get pushed out of the window. of course I scroll up and I find the latest files only not all. Is there any option control this feature? and how can I see all results?
To avoid this you should convert your console application to a Windows Forms one and put all the output on a TextBox. Just execute the command on the Form load and redirect all the output to the TextBox.
It's not much work IMHO.
This is the nature of a console application, no different than if you were to echo data to the Windows command prompt. If there is too much data then of course it will scroll off the visible screen.

xcode debugger options

What are the three options we see in the debug console in Xcode? Just curious to know why there are three options? What purpose each option serve?
Debugger output is stuff printed by the debugger itself, and target output is what is printed by your application (printf, NSLog, etc).
Perhaps a read through of the Xcode User's Guide would do us all a little good tonight:
The Console Pane
The console pane displays program output and lets you enter commands
to the debugger tool. You specify the type of output the console
displays with the pop-up menu in the top-left corner of the console
pane:
All Output displays target and debugger output.
Debugger Output
displays debugger output only.
Target Output displays target output
only.

Microstation launching into a blank window (no menus or anything)

We have a VB6 application here that automates the process of opening drawings and printing them with a specific printer that turns them into TIFF files.
I'm in the process of testing the application as we upgrade from V8 to V8i and I'm running into some problems just launching the application.
If I open the Microstation normally via the exe file everything works ok. But when I do:
Set msApp = CreateObject("MicrostationDGN.Application")
It opens a blank microstation window with no menus or anything (basically what the window looks like behind the file open dialog)
And then I do
msApp.OpenDesignFile ("dummy.dgn")
that looks like this: imgur.com/A5rc4.png
Is there something new with v8i where it doesn't bother loading the gui when opened as an object?
Did your application depends on some user preference of Microstation? I think you can debug your aplication step by step.
You can call the ustation.exe with the parameter -debug. This creates a file called debug.txt in the current working directory.
There you might find some helpful info.

Running application in Visual Studio Express

I am coming from XCode and this is probably a stupid question, but after I build my program successfully, I try to click on the Application in the debug folder and the window just closes. How do I run my application that I create?
The above answers are correct, but if your question is simply why your command prompt closes immediately upon your program's termination, you have two options:
Put a breakpoint on your main()'s } before you run.
Use Ctrl+F5, which will add a "Press any key to continue" at the end so you can see all of your program's output, but it will launch the application without attaching the debugger.
You can compile and run the program by pressing F5.
However, if you're talking about non-gui console application which just prints something and exists,
the output window will close right away. If this is the case, you might want to open command prompt (cmd.exe) and run it from there manually, or insert some "wait for keypress" handling, such as getchar().
Otherwise, there might be something wrong with your program :)
Debug --> Run
or
press F5

Resources