Cmake-based project (C++) can't run under debugger


#1

console shows this message

module.js:327
throw err;
^

Error: Cannot find module '/home/ubuntu/.c9/bin/.js’
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3


#2

which runner do you use? this seems like a typo in the name of '/home/ubuntu/.c9/bin/c9gdbshim.js in the runner


#3

thank you for the reply. Il’l check my runner.

could you have a look at this?
this is incomplete, you see, but debug branch is what I’m trying to use at this moment

{
 "script" : [
        "set -e",
//  make should be under the condition, to build required target only        
        "cd \"$project_path\"build/",
        "make",
        "cd \"$project_path\"",
//  if a debug flag enabled then run an application        
        "if [ \"$debug\" == true ]; then ",
            "chmod 755 \"$project_path\"build/src/\"$project_name\"",
            "node $HOME/.c9/bin/.js \"$project_path\"/build/src/\"$project_name\" $args",
//  unit tests otherwise            
//        "else",
//            "/usr/bin/g++ -std=c++11 $file -o $file.o",
//            "chmod 755 $file.o",
//            "$file.o $args",
        "fi"
    ],
    "info": "Running ...",
    
    "debugger": "gdb",
    "$debugDefaultState": true,
    
    "env" : {},
    "selector": "*.*"
}

#4

solved: missing “c9gdbshim” in he path
thank you that you have paid my attention on this !