Skip to content

Commit

Permalink
add debug configuration for vscode (build & run tasks)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeckerSU committed Nov 13, 2024
1 parent 636337d commit fd54154
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": ["ISNOTARYNODE=1"],
}
],
"version": 4
}
41 changes: 41 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// 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": [
{
"name": "(gdb) iguana (mainnet)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/agents/iguana",
"args": ["notary"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/iguana",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
//"preLaunchTask": "Build Iguana [debug]",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"name": "(lldb) iguana (mainnet)",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/agents/iguana",
"args": ["notary"],
"cwd": "${workspaceFolder}/iguana"
}
]
}
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// The following will hide unneeded files in the editor
"files.exclude": {
"**/*.o": true,
"**/*.a": true,
"**/*.lo": true,
"**/*.Po": true,
"**/*.Plo": true,
"**/*.la": true,
"**/*.lai": true,
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/*.o": true,
"**/*.a": true,
"**/*.lo": true,
"**/*.Po": true,
"**/*.Plo": true,
"**/*.la": true,
"**/*.lai": true,
}
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Iguana [debug]",
"type": "shell",
"command": "make clean; make CFLAGS='-g -Wno-deprecated -O0 -DISNOTARYNODE=1' CFLAGS_NO_OPTIMIZATION='-g -Wno-deprecated -O0 -DISNOTARYNODE=1' -j$(nproc)",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}/iguana/"
},
}
]
}

0 comments on commit fd54154

Please sign in to comment.