Skip to content

Commit

Permalink
VSCode files
Browse files Browse the repository at this point in the history
* Suggested project extensions for developing in C/C++, Python and Soar
* Configuration for C/C++ IntelliSense
* Debug and run launch configurations
  • Loading branch information
garfieldnate committed Aug 25, 2023
1 parent 29fc5ce commit 7a1240b
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -518,5 +518,3 @@ build_*.*
testCommandToFile-output.soar
soarversion
build_time_date

.vscode/
21 changes: 21 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"configurations": [
{
"name": "Mac",
"macFrameworkPath": [
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "macos-clang-arm64",
// build the project once to generate this file
"compileCommands": "${workspaceFolder}/compile_commands.json",
"compilerPath": "/usr/bin/clang"
}
],
"version": 4
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"ms-vscode.cpptools",
"ms-python.python",
"editorconfig.editorconfig",
"bdegrend.soar"
]
}
61 changes: 61 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
// 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": "Debug UnitTests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/out/UnitTests",
// "args": ["-e", "PRIMS_Sanity1", "-e", "PRIMS_Sanity2", "-f", "testSmemArithmetic", "-l", "-c", "FullTestsClientThread"],
"args": ["-e", "PRIMS_Sanity1","-c", "MiscTests"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/out",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"osx": {
"MIMode": "lldb",
"targetArchitecture": "ARM64"
}
},
{
"name": "Debug Soar CLI",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceRoot}/out/soar",
"MIMode": "gdb",
"osx": {
"MIMode": "lldb",
"targetArchitecture": "ARM64"
}
},
{
"name": "Debug soar.dll loaded by Java",
"type": "cppdbg",
"request": "attach",
"program": "${env:JAVA_HOME}/bin/java",
"MIMode": "gdb",
"osx": {
// Keep in mind that VSCode might freeze for you! You may need to use lldb directly instead.
// https://github.com/microsoft/vscode-cpptools/issues/7240
// You may also need to codesign your java executable with permissions to debug:
// https://stackoverflow.com/questions/66575538/xcode-lldb-cant-attach-to-macos-system-program-bin-cp-not-allowed-to-attach
"MIMode": "lldb",
"targetArchitecture": "ARM64"
},
},
{
"name": "Debug project build",
"type": "python",
"request": "launch",
"program": "scons/scons.py",
"args": ["--scu", "--dbg", "all", "performance_tests"],
"console": "integratedTerminal",
"justMyCode": false
},
// TODO: Python debugger for scons build
]
}

0 comments on commit 7a1240b

Please sign in to comment.