Author Topic: [CLOSED] Output windows not refresh during debug ?  (Read 1173 times)

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
[CLOSED] Output windows not refresh during debug ?
« 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.
« Last Edit: November 17, 2018, 08:23:48 am by jmfrouin »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2920
  • Hero Points: 438
Re: Output windows not refresh during debug ?
« Reply #1 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.

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
Re: Output windows not refresh during debug ?
« Reply #2 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;
}

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
Re: Output windows not refresh during debug ?
« Reply #3 on: November 12, 2018, 12:14:30 pm »
Hi,
Any news about this ?
Thanks

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5145
  • Hero Points: 425
Re: Output windows not refresh during debug ?
« Reply #4 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.

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
Re: Output windows not refresh during debug ?
« Reply #5 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

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5145
  • Hero Points: 425
Re: Output windows not refresh during debug ?
« Reply #6 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.

jmfrouin

  • Senior Community Member
  • Posts: 103
  • Hero Points: 2
Re: Output windows not refresh during debug ?
« Reply #7 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