SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jmfrouin on October 31, 2018, 10:32:39 am

Title: [CLOSED] Output windows not refresh during debug ?
Post by: jmfrouin on October 31, 2018, 10:32:39 am
Hi,
I have a program, in C++, which produces a lot of output info using : std::cout << "DEBUG ..." << std::endl.
If I run it in debug, after the debug session, I got all output in "Build" windows (Screenshot).

I have 2 questions :
- Why in "Build" windows, and not in "Output" windows ?
- Why during the debug session, nothing output nor in Build, nor in Output Windows ?

In order to follow "output", I need to redirect output to file, which is filled during the debug session.

Don't know if it's clear ?

It's very annoying for me.
Title: Re: Output windows not refresh during debug ?
Post by: Dennis on October 31, 2018, 02:31:42 pm
Which debugger subsystem are you using?  WinDBG, GDB, or LLDB ?

What platform are you on?

How did you start the debugger?  Debug > Start, Debug > Step In, Debug > Attach to Process... ?

The "vsdebugio" process is supposed to transmit the application output through from the debugger integration to the Build window.  We send output to the Build window rather than Output just to make what happens when you do "Debug > Start" is consistent with what happens when you do "Build > Execute".

Do you think you could put together a small sample program that I could test this with?  Maybe it is merely a problem of vsdebugio needing to flush() the output more frequently.
Title: Re: Output windows not refresh during debug ?
Post by: jmfrouin on October 31, 2018, 03:44:24 pm
I used GDB under Debian Stretch
I start using  : Debug->Start (F5)

And for example (haven't test it) but

#include <iostream>

int main()
{
for(int i = 100; --i;)
{
   std::cout << "Output : " << i << std::endl; //Push breakpoint here
}
return 1;
}
Title: Re: Output windows not refresh during debug ?
Post by: jmfrouin on November 12, 2018, 12:14:30 pm
Hi,
Any news about this ?
Thanks
Title: Re: Output windows not refresh during debug ?
Post by: Clark on November 12, 2018, 11:00:53 pm
If I try your sample, I get debug output in the Build window while it hits the breakpoint for each loop iteration.

Build window is more of a terminal window. You can type commands there just like a terminal. That's why your output goes there. There is a message list tool window which scrapes error messages but program output remains in the build window. The Output window is used for some tools that are not run in the build window.
Title: Re: Output windows not refresh during debug ?
Post by: jmfrouin on November 16, 2018, 08:09:43 pm
Hi,
Sorry to insist, but I try with  a new projet, and this source code :
#include <iostream>

using namespace std;

int main (int argc, char *argv[])
{
  for(int i=0; i<200; i++)
  {
    std::cout << "Test " << i << std::endl;
  }
  return (0);
}

And nothing output to "Output windows"
You can see the value of i in Watches in upper left.
It's probably due to something I do wrong.
Maybe a wrong setting ?

I attached a screenshot of SE
Title: Re: Output windows not refresh during debug ?
Post by: Clark on November 16, 2018, 08:51:46 pm
That is correct. Output from your application is not sent to the Output tool window. That is intentional. Output from your application goes to the Build window.
Title: Re: Output windows not refresh during debug ?
Post by: jmfrouin on November 17, 2018, 08:23:05 am
OK you right !
Since on new project the Build Windows is hide, I re-add it, and output is here :)
Thanks