Skip to content

Instantly share code, notes, and snippets.

@jankeromnes
Created July 17, 2017 12:13
Show Gist options
  • Save jankeromnes/ddbb9915c79b31710f6b47dd207ccf09 to your computer and use it in GitHub Desktop.
Save jankeromnes/ddbb9915c79b31710f6b47dd207ccf09 to your computer and use it in GitHub Desktop.
Configuring Cloud9 IDE for Firefox (brain dump with examples)
/*
└─ your.plugin
├─ builders // https://cloud9-sdk.readme.io/v0.1/docs/builders
| └─ firefox.build {
"cmd": ["./mach", "build", "$file", "$args"],
"env": {},
"selector": "source.ext"
}
├─ runners // https://cloud9-sdk.readme.io/v0.1/docs/runners
| └─ haskell.run {
"cmd": ["ls", "$file", "$args"],
"info": "Started $project_path$file_name",
"env": {},
"selector": "source.ext"
}
├─ package.json
└─ README.md
*/
// Set runner as default
settings.setJson("project/run/configs", {
"Name": {
"runner": "Runner Name",
"command": "",
"name": "Name",
"default": true
}
})
// Configure GDB in the runner: https://github.com/c9/c9.ide.run/blob/master/runners/C%20(simple).run
{
"script" : [
"set -e",
"if [ \"$debug\" == true ]; then ",
"/usr/bin/gcc -ggdb3 -O0 -std=c99 $file -o \"$file\".o",
"chmod 755 $file.o",
"gdbserver --once :15470 \"$file.o\" $args",
"else",
"/usr/bin/gcc -std=c99 $file -o $file.o",
"chmod 755 \"$file.o\"",
"\"$file.o\" $args",
"fi"
],
"info": "Running \"$file\"",
"debugport": 15470,
"debugger": "gdb",
"executable": "$file.o",
"maxdepth": 50,
"$debugDefaultState": false,
"env" : {},
"selector": "^.*\\.c$"
}
{
"cmd": [
"node",
"${debug?--nocrankshaft}",
"${debug?--nolazy}",
"${debug?`node --version | grep -vqE \"v0\\..\\.\" && echo --nodead_code_elimination`}",
"${debug?--debug-brk=15454}",
"$file",
"$args"
],
"debugger": "v8",
"debugport": 15454,
"selector": "source.js"
}
// Upload a patch, use process https://cloud9-sdk.readme.io/docs/the-process-api
proc.spawn("git", {
args: ["bz", "attach", "-e", "commitId"],
cwd: "/home/user/firefox"
}, function(err, p){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment