How can I use Visual Studio Code for debugging MATLAB MEX-files or Simulink S-Functions compiled with MingW64 on Windows or GCC/G++ on Linux?

Can I use Visual Studio Code to debug my MinGW64 MEX-files? And can I use it on Linux to debug my GCC MEX-files?

 采纳的回答

Yes, you can use Visual Studio Code for debugging MinGW64 and GCC MEX-files. See How can I use Visual Studio Code to debug my MinGW C/C++ file? for a downloadable Visual Studio Code example project and up-to-date information on debugging with newer releases. The debugging workflow in that article should work with gcc/gdb on Linux machines.

2 个评论

We are aware of an issue when debugging with newer releases (for example, VS Code 1.92.2 and R2024a). VS Code does not halt at the set breakpoints, and the breakpoints are not confirmed to be set by VS Code and show "Attempting to bind the breakpoint..."
This appears to be an issue on VS Code's side and has been reported already:

请先登录,再进行评论。

更多回答(0 个)

产品

版本

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by