Skip to content

Instantly share code, notes, and snippets.

@benwtrent
Created November 9, 2018 19:59
Show Gist options
  • Save benwtrent/1e4d1c5943ac1df239d4dea9ce9f7df2 to your computer and use it in GitHub Desktop.
Save benwtrent/1e4d1c5943ac1df239d4dea9ce9f7df2 to your computer and use it in GitHub Desktop.
Various .vscode files used to work with: https://github.com/elastic/ml-cpp
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/include/boost-1_65_1/",
"/usr/local/include",
"/usr/include"
]
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 4
}
{
"version": "0.2.0",
"configurations": [
{
"name": "api unittest Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/lib/api/unittest/ml_test",
"args": [],
"cwd": "${workspaceFolder}/lib/api/unittest",
"environment": [
{"name": "ML_DEBUG", "value": "true"}
],
"externalConsole": true,
"MIMode": "lldb",
"preLaunchTask": "build api tests"
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "clean api tests",
"type": "shell",
"command": "make clean",
"group": "build",
"options": {
"cwd": "${workspaceFolder}/lib/api/unittest",
},
},
{
"label": "clean all",
"type": "shell",
"command": "make clean",
"group": "build",
"options": {
"cwd": "${workspaceFolder}",
},
},
{
"label": "build all with debug",
"type": "shell",
"command": "make -j7",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}",
"env": {
"ML_DEBUG": "true"
}
}
},
{
"label": "build api tests",
"type": "shell",
"command": "make -j7",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"cwd": "${workspaceFolder}/lib/api/unittest",
"env": {
"ML_DEBUG": "true"
}
},
"dependsOn": ["build all with debug"]
}
]
}
@benwtrent
Copy link
Author

https://gist.github.com/benwtrent/1e4d1c5943ac1df239d4dea9ce9f7df2#file-launch-json-L9

Put the specific test name in there like, "args": ["CStringStoreTest::testAttributeStringPruning"].

Periodically, the debugger fails to attach the ml_test executable. Usually simply running again works out ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment