简体   繁体   中英

Why is there no Console Window showing up whilst debugging

Alright so I have been trying to fix this for a while, but with NO SUCCESS , I've come here to search for help instead. I'd appreciate it!

So basically, when I debug with gdb it should give me a console window saying "Hello World" (cause that is what I wrote in my code) right? Well you guessed, there is no console window for me.

This is the code i've written:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;

    return 0;
}

This is supposed to give me an "Hello World" output in the console window but it is not, cause the console window is not even there when I debug. I've double checked almost everything and I can't find ANY SOLUTION at all.

Thanks for listening as this is very frustrating for me.

If you are using VSCode in launch.json file with a configuration of debug execution you can use

"externalConsole": true

which allows you to see your output not in the embedded terminal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM