Debugging in Sublime Text 3

Hello Friends,
I am new to Sublime Text 3 just shifted from VIM, done all the setups properly for timeout and other execution related things. Now when I run some of my codes with Floating Point Error or Seg fault error it does not show anything related to this which makes it difficult to debug the code.

So how should I do this, please help.
Thank You

1 Like

You can use SublimeGDB plugin.

Thank you @gkalyan, I have one more doubt that whenever I run the cpp file for each cpp file it creates a different object file instead of which I want to make create just one object file a.out, so what should I do.

Here is my custom system build for sublime text 3

    "shell_cmd": "g++ \"${file}\" -std=c++17 -o \"${file_path}/${file_base_name}\"",
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
    "working_dir": "${file_path}",
    "selector": "source.c, source.c++",

            "name": "Run",
            "shell_cmd": "g++ \"${file}\" -std=c++1y -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""

    "target": "timeout_exec",
    "cancel": {"kill": true},

    "timeout": 3,

    "shell_cmd": "echo \"Start\" && sleep 10 && echo \"Done\""

Thank You