是否可以使用Eclipse调试mex代码? [英] Is it possible to debug mex code with Eclipse?
问题描述
调试C / gdb中的C ++ MEX文件已经在官方文档,所以我的建议是尝试将gdb与Eclipse CDT集成。
有很多关于如何正确执行的信息,所以我不会在这里重复一切。我知道的最好的教程是IBM的两部分指南,与CDT调试器接口:
- < a href =http://www.ibm.com/developerworks/library/os-eclipse-cdt-debug1/index.html =nofollow noreferrer> 第1部分:了解C / C ++调试器界面 - 涵盖了高级别的基础知识。
- 第2部分:使用Eclipse CDT和MI访问gdb - 介绍如何使Eclipse与gdb一起工作。 >
我认为第2部分是你真正需要的。基本上,您必须安装插件,并在Eclipse中进行配置。
还有很多有关这个问题的StackOverflow甚至在这里:
- 如何在Eclipse中使用GDB进行C / C ++调试?
- 如何将GDB调试器安装到Eclipse CDT
- 使用Eclipse CDT和GDB进行调试
- 如何在使用Eclipse CDT调试时输入gdb提示符?
我没有尝试了,所以我希望这样做。
I am trying to write some mex code but it is painful to debug it on the console with gbd. Is it possible to use Eclipse or the GUI of Matlab? If these are not feasible methods, what is the best way of writing mex code that provides good debug capabilities?
Debugging C/C++ MEX files in gdb is already comprehensively covered in the official documentation, so my suggestion is to try and integrate gdb with Eclipse CDT.
There's plenty of information out there about how to do it properly, so I'm not going to repeat everything here. The best tutorial I know is IBM's two-part guide, "Interfacing with the CDT debugger":
- Part 1: Understand the C/C++ debugger interface - covers the high-level basics.
- Part 2: Accessing gdb with the Eclipse CDT and MI - explains how to make Eclipse work with gdb.
I think part 2 is what you really need. Basically, you have to install a plug-in and configure it in Eclipse.
There are also quite a few related questions about this even here on StackOverflow:
- How do I use GDB in Eclipse for C/C++ Debugging?
- How to install GDB debugger to Eclipse CDT
- Debugging with Eclipse CDT and GDB
- How can I enter commands to a gdb prompt while debugging with Eclipse CDT?
I haven't tried it out yet, so I hope this works.
这篇关于是否可以使用Eclipse调试mex代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!