Improve VS Code debug
Allow debugging of session-tests and improve VS Code debug tasks. New VS Code task to download and start server for debugging New VS Code tasks to build only changed files and full rebuild
This commit is contained in:
parent
42bbdc9f07
commit
468e69d76e
|
@ -4,6 +4,24 @@
|
|||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug LLDB",
|
||||
"program": "node",
|
||||
"cwd": "${workspaceRoot}/tests",
|
||||
"args": ["--debug-brk=5858", "${workspaceRoot}/tests/node_modules/jasmine/bin/jasmine.js", "spec/unit_tests.js"],
|
||||
"stopOnEntry": true
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug LLDB only",
|
||||
"program": "node",
|
||||
"cwd": "${workspaceRoot}/tests",
|
||||
"args": ["${workspaceRoot}/tests/node_modules/jasmine/bin/jasmine.js", "spec/unit_tests.js"],
|
||||
"stopOnEntry": false
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
|
@ -24,6 +42,30 @@
|
|||
"args": [
|
||||
"spec/unit_tests.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Download & Start Server",
|
||||
"cwd": "${workspaceRoot}/scripts"
|
||||
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"request": "attach",
|
||||
"name": "Attach to Port",
|
||||
"address": "localhost",
|
||||
"port": 5858
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Rebuild + Start Server + Debug",
|
||||
"configurations": ["Download & Start Server", "Debug Node Unit Tests (rebuild)"]
|
||||
},
|
||||
{
|
||||
"name": "Debug LLDB + NodeJS",
|
||||
"configurations": ["Debug LLDB", "Attach to Port"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,15 +2,33 @@
|
|||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "0.1.0",
|
||||
"command": "npm",
|
||||
"isShellCommand": true,
|
||||
"showOutput": "always",
|
||||
"suppressTaskName": true,
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "rebuild-node-tests",
|
||||
|
||||
"args": ["run", "prenode-tests"]
|
||||
"taskName": "Rebuild Node Tests",
|
||||
"command": "npm",
|
||||
"isShellCommand": true,
|
||||
"showOutput": "always",
|
||||
"suppressTaskName": true,
|
||||
"args": ["run", "rebuild-changes"],
|
||||
"isBuildCommand": false
|
||||
},
|
||||
{
|
||||
"taskName": "Build Node Tests",
|
||||
"command": "npm",
|
||||
"isShellCommand": true,
|
||||
"showOutput": "always",
|
||||
"suppressTaskName": true,
|
||||
"args": ["run", "build-changes"],
|
||||
"isBuildCommand": true
|
||||
},
|
||||
{
|
||||
"taskName": "Download and Start Server",
|
||||
"command": "${workspaceRoot}/scripts/download_and_start_server.sh",
|
||||
"isShellCommand": true,
|
||||
"showOutput": "always",
|
||||
"echoCommand": true,
|
||||
"isBackground": true,
|
||||
"suppressTaskName": true
|
||||
}
|
||||
]
|
||||
}
|
|
@ -48,10 +48,12 @@
|
|||
"set-version": "scripts/set-version.sh",
|
||||
"get-core-version": "env-cmd ./dependencies.list node -p process.env.REALM_CORE_VERSION",
|
||||
"get-sync-version": "env-cmd ./dependencies.list node -p process.env.REALM_SYNC_VERSION",
|
||||
"lint": "eslint",
|
||||
"lint": "eslint",
|
||||
"test": "scripts/test.sh",
|
||||
"install": "node-pre-gyp install --fallback-to-build",
|
||||
"prepublish": "node scripts/prepublish.js",
|
||||
"build-changes": "node-pre-gyp build --fallback-to-build --debug --build-from-source",
|
||||
"rebuild-changes": "node-pre-gyp install --fallback-to-build --debug --build-from-source && cd tests && npm install",
|
||||
"prepublish": "echo prepublishing && node scripts/prepublish.js",
|
||||
"eslint": "npm install && npm run lint .",
|
||||
"license-check": "npm install && license-checker --exclude \"MIT,ISC,BSD,Apache-2.0,BSD-2-Clause,BSD-3-Clause,WTFPL,Unlicense,(MIT AND CC-BY-3.0)\" | node scripts/handle-license-check.js",
|
||||
"jsdoc:clean": "rimraf ./docs/output",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -o pipefail
|
||||
set -e
|
||||
echo $(pwd)
|
||||
sh scripts/download-object-server.sh && sh object-server-for-testing/start-object-server.command -f && echo \"Server PID: $!\"
|
Loading…
Reference in New Issue