How to debug libsass library?

113 Views Asked by At

I have cloned libsass and sassc and compiled it manually using makefile to generate its executable. Everything works just fine But I need to debug the libsass library to do some changes. I am using VSCode in Mac.

For a simple helloworld program, when I configure launch.json to execute its executable, the breakpoint works just fine. But for sassc it is not working.

This is the launch.json file am using in VSCode. Should I make any changes in this or should I understand something else?

{
// 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"
    }
]
}

Edit:

I am using Mac and as per 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, C/C++ project is not yet supported in Mac Visual Studio and I am not gonna use VM. So either I had to use XCode or VSCode as per my knowledge and since VSCode is lightweight and I have worked with it before, I opted for VSCode. If you have any other suggestions, let me know.

0

There are 0 best solutions below