mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
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
9a73d9d215
42
.vscode/launch.json
vendored
42
.vscode/launch.json
vendored
@ -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"]
|
||||
}
|
||||
]
|
||||
}
|
26
.vscode/tasks.json
vendored
26
.vscode/tasks.json
vendored
@ -2,15 +2,33 @@
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "0.1.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "Rebuild Node Tests",
|
||||
"command": "npm",
|
||||
"isShellCommand": true,
|
||||
"showOutput": "always",
|
||||
"suppressTaskName": true,
|
||||
"tasks": [
|
||||
"args": ["run", "rebuild-changes"],
|
||||
"isBuildCommand": false
|
||||
},
|
||||
{
|
||||
"taskName": "rebuild-node-tests",
|
||||
|
||||
"args": ["run", "prenode-tests"]
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
@ -51,7 +51,9 @@
|
||||
"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",
|
||||
|
6
scripts/download_and_start_server.sh
Executable file
6
scripts/download_and_start_server.sh
Executable file
@ -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…
x
Reference in New Issue
Block a user