C++ 在QT中,什么是Visual Studio.Net[DebuggerStepThrough]的等价物?

C++ 在QT中,什么是Visual Studio.Net[DebuggerStepThrough]的等价物?,c++,qt,qt-creator,C++,Qt,Qt Creator,在Qt中调试时,我想忽略一些行。 我知道我可以在Visual Studio.Net中使用[DebuggerStepThrough] 但是我想知道Qt,C++中的这个代码的等价性。 Qt中是否有用于此目的的代码,如果没有,如何在Qt Creator中执行此操作?在使用Visual Studio编译器的windows上,您可以使用以下内容: int main(int argc, char** argv) { //code to run at any build foo();

在Qt中调试时,我想忽略一些行。
我知道我可以在Visual Studio.Net中使用
[DebuggerStepThrough]



但是我想知道Qt,C++中的这个代码的等价性。
Qt中是否有用于此目的的代码,如果没有,如何在Qt Creator中执行此操作?

在使用Visual Studio编译器的windows上,您可以使用以下内容:

int main(int argc, char** argv) {
    //code to run at any build
    foo();

    //code to run only in debug build
    #ifdef _DEBUG
    bar();
    #endif

    //code to run only in release build
    #ifndef _DEBUG
    baz();
    #endif
}

我希望这能有所帮助。

这与Qt或Qt Creator无关,它将是调试器的一项功能,您还没有指定。@cmannett85:谢谢您的评论,据我所知,Qt或Qt Creator只有一个调试器,
GDB
。我是Qt新手,我想在调试模式下忽略一些代码,我该怎么做?