在 MacOS 上使用 Visual Studio Code 调试 MEX 导致 Matlab 崩溃

问题描述

我正在尝试在 Mac (M1) 上使用 Visual Studio Code 进行调试。我在 Windows 上找到了这篇不错的博客文章https://blogs.mathworks.com/developer/2018/06/19/mex-debugging-vscode/

我已经尝试适应它,这是我的launch.json:

    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information,visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0","configurations": [
        {
            "name": "(lldb) Attach","type": "cppdbg","request": "attach","program": "/Applications/MATLAB_R2021a.app/bin/matlab","processId": "${command:pickProcess}","MIMode": "lldb","setupCommands": [
                {
                    "text": "handle SIGSEGV nostop"
                },{
                     "text": "handle SIGSEGV noprint"
                }
            ],},]

但是,当我附加到 Matlab 并运行我的 mex 文件时,Matlab 冻结到强制退出甚至不再关闭它的程度,我必须重新启动才能重新启动 Matlab。

请帮忙

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)