Where did the black windows go?

Completed

Dear Ms./Mr. I have faced with one serious problem. After upgrading CLion up to 2017.3 version some Cmake errors began to appear. I've managed with them, but there's one more important thing. Now I can't see, what my program does print out, because there's no black window while I debug the programm. I'm working on Windows 10, on a laptop. Do you know, how can I get it back ?

With respect, Evgeny Aleksandrov.

0
10 comments

Hi!

The system terminal was used only on Windows as a workaround (when the built-in terminal wasn't working properly in some cases). Now, similar to other platforms, the output is printed to the default Run window for both, Run and Debug.

If you would like to have an ability to run a debug session in a separate console window, please feel free to comment or upvote a related feature request in our tracker: https://youtrack.jetbrains.com/issue/CPP-1576.

0
Avatar
Permanently deleted user

@Anna Falevskaya I'm not able to see any output at all when in Debug mode, Run window is empty. Any way to fix this?

0

@Kelej please describe the issue in more details.

Do you see the output if you run the project in Run mode? Does a separate console window open when you run the project in Debug mode? What version of MinGW/Cygwin do you use? What version of debugger do you use?

0
Avatar
Permanently deleted user

@Anna Falevskaya I'm running MinGW 5.0 with JetBrains bundled GDB (8.0.1) on Windows10 64bit, CLion 2017.3.

Output is printed in Run mode, in default Run window as it did before. In Debug mode it used to open a separate console window where output was printed, however now it doesn't do that anymore, nor does it get printed on the Run window as described in the patch changelog.

Thank you for your support.

0

@Kelej thanks for the quick reply!

I ran the simple "Hello, world!" project in Debug mode and the output was printed:

My testing environment: Windows 10 64-bit machine, CLion 2017.3 and toolchains as follows:

Could you please try running some very simple project? Is anything printed in Run/Debug window (at least information about the executable)? Please provide us with the simple project which you use for testing and the screenshot of resulting Run/Debug window.

0
Avatar
Permanently deleted user

@Anna Falevskaya I ran a simple project as well and it seems it does print output on Run window IF I don't set any breakpoints. If i set a breakpoint no output is printed anywhere. This however doesn't seem to be consistent (loading any previous project and running debug with no breakpoints still does not print output).

0

@Kelej thanks for the information! Looks like I have reproduced the issue with breakpoints. In my case, if I set a breakpoint, the result is finally printed in Run window, but only when I reach the end of the program (i.e. when debugging process finishes). Do you have the same behaviour? 

Also please enable debugger logging as described here, reproduce the issue and send the resulting idea.log file to clion-support at jetbrains.com. Thanks!

0
Avatar
Permanently deleted user

@Kelej, maybe it's because when you call printf, it does not print the text immediately, it's buffered. If you want to disable buffering, just enter the following string of code before any printing (it helped for me): 

setbuf(stdout, 0);
1
Avatar
Permanently deleted user

@Anna Falevskaya, output is never printed when the program ends, besides the message below (note that it's the Console window in Debug section, not the Run window, should it be relevant)

Same project with no breakpoints:

I sent the request and log as you suggested.

@E Aleksandrov2, Thanks, that does indeed help! I guess I'll continue to use that workaround until a fix is available.

Behavior with Aleksandrov's suggestion:

Another workaround: using MinGW's gdb (v7.6.1) opens the old console window in Debug mode.

0

@E Aleksandrov2 thanks for the workaround about printing the output.

@Kelej I've added the details about your case in comments to https://youtrack.jetbrains.com/issue/CPP-10733. Please follow the issue to get updates.

0

Please sign in to leave a comment.