如何调试libsass库?

时间:2019-02-06 02:26:32

标签: c visual-studio-code vscode-settings vscode-debugger libsass

我已经克隆了libsass和sassc,并使用makefile对其进行了手动编译,以生成其可执行文件。一切正常,但是我需要调试libsass库进行一些更改。我在Mac中使用VSCode。

对于一个简单的helloworld程序,当我配置launch.json以执行其可执行文件时,断点就可以正常工作。但是对于sassc,它不起作用。

这是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) Launch",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceFolder}/sassc/bin/sassc", //sassc.exe path
        "args": ["${workspaceFolder}/ex/sample.scss","${workspaceFolder}/ex/sample.css"],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "lldb"
    }
]
}

编辑:

我正在使用Mac,并且根据https://social.msdn.microsoft.com/Forums/en-US/ef99e9f5-2a48-423b-b6c0-fa5617d7c63d/how-do-i-get-c-to-work-on-visual-studio-for-mac?forum=visualstudiogeneral,Mac Visual Studio尚不支持C / C ++项目,并且我不会使用VM。因此,根据我的知识,我不得不使用XCode或VSCode,并且由于VSCode是轻量级的并且我之前已经使用过它,因此我选择了VSCode。如果您还有其他建议,请告诉我。

0 个答案:

没有答案