debug chainhook
ide: vscode
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'chainhook-sdk'",
"cargo": {
"args": [
"run",
"--package",
"chainhook",
]
},
"args": [
"predicates",
"scan",
"--config-path",
"config.toml",
"predicate.json"
// "service",
// "start",
// "--config-path=config.toml"
],
"cwd": "${workspaceFolder}"
},
]
}
error info :
Finished dev [unoptimized + debuginfo] target(s) in 0.93s
Running `target/debug/chainhook`
Error: Cargo invocation failed.
at t.Cargo.getCargoArtifacts (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:15379)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.open (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:13689)
Caused by: Error: Could not parse JSON: "chainhook 0.16.0"
at Interface. (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:16948)
at Interface.emit (node:events:513:28)
at Interface._onLine (node:readline:491:10)
at Interface._normalWrite (node:readline:665:12)
at Socket.ondata (node:readline:272:10)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Caused by: SyntaxError: Unexpected token 'c', "chainhook 0.16.0" is not valid JSON
at JSON.parse ()
at Interface. (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:16927)
at Interface.emit (node:events:513:28)
at Interface._onLine (node:readline:491:10)
at Interface._normalWrite (node:readline:665:12)
at Socket.ondata (node:readline:272:10)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
debug chainhook ide: vscode launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "lldb", "request": "launch", "name": "Debug unit tests in library 'chainhook-sdk'", "cargo": { "args": [ "run", "--package", "chainhook", ] }, "args": [ "predicates", "scan", "--config-path", "config.toml", "predicate.json" // "service", // "start", // "--config-path=config.toml" ], "cwd": "${workspaceFolder}" }, ] }
error info :
Error: Cargo invocation failed. at t.Cargo.getCargoArtifacts (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:15379) at process.processTicksAndRejections (node:internal/process/task_queues:96:5) at async Object.open (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:13689) Caused by: Error: Could not parse JSON: "chainhook 0.16.0" at Interface. (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:16948)
at Interface.emit (node:events:513:28)
at Interface._onLine (node:readline:491:10)
at Interface._normalWrite (node:readline:665:12)
at Socket.ondata (node:readline:272:10)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Caused by: SyntaxError: Unexpected token 'c', "chainhook 0.16.0" is not valid JSON
at JSON.parse ()
at Interface. (/Users/ak-pdy/.vscode/extensions/vadimcn.vscode-lldb-1.9.2/extension.js:1:16927)
at Interface.emit (node:events:513:28)
at Interface._onLine (node:readline:491:10)
at Interface._normalWrite (node:readline:665:12)
at Socket.ondata (node:readline:272:10)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)