使用 Eclipse CDT 调试 ncurses

2023-08-26C/C++开发问题
1

本文介绍了使用 Eclipse CDT 调试 ncurses的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在 Eclipse CDT 中使用 ncurses 编写 C++ 应用程序,但是我无法在 Eclipse 中运行/调试我的应用程序,因为 Eclipse 中的控制台不适用于 Curses.如果我从终端运行,我的应用程序运行良好,但我刚刚添加了一些新代码,现在出现分段错误,因此我想在 eclipse 中使用调试器来帮助我解决问题.有没有办法让 eclipse 运行/调试我的应用程序,但使用不同的终端作为输出,就像在 gdb 中执行tty/dev/pts/1"一样?或者有什么其他方法可以在 Eclipse 中调试 ncures 应用程序?

I'm writing a C++ application using ncurses in Eclipse CDT however I can't run/debug my app in eclipse because the console in eclipse does not work with curses. My app runs fine if I run it from a terminal but I just added some new code and now I'm getting a segmentation fault so I'd like to use the debugger in eclipse to help me fix the issue. Is there a way to have eclipse run/debug my application but use a different terminal for the output much like when you do "tty /dev/pts/1" in gdb? Or any other way to debug a ncures application in eclipse?

提前谢谢!

推荐答案

您还应该在调试配置"对话框中将 TERM=xterm 添加到环境中

also you should add TERM=xterm to Environment in the Debug Configurations dialog

这篇关于使用 Eclipse CDT 调试 ncurses的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6