From dcd15f161defd6bbe6366392f29d42245f93bbef Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Thu, 16 Sep 2021 18:09:38 -0700 Subject: [PATCH] add debugging --- .vscode/launch.json | 29 +++++++++++++++++++++++++++++ .vscode/settings.json | 1 + .vscode/tasks.json | 8 ++++---- README.md | 13 +++++++++---- 4 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..911a105 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // 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": "g++ - Build and debug simulation", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/main.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${fileDirname}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "Debug" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 5c33467..72bdb17 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,4 +43,5 @@ "C_Cpp.clang_format_fallbackStyle": "LLVM", "editor.formatOnSave": true, "editor.formatOnPaste": true, + "python.formatting.provider": "black", } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 1055066..2a51d43 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,15 +3,15 @@ "tasks": [ { "type": "cppbuild", - "label": "Debug", + "label": "Build simulation", "command": "g++", "args": [ "-g", - "${workspaceFolder}\\src\\main.cpp", + "${workspaceFolder}/src/main.cpp", "-o", - "${workspaceFolder}\\main.exe", + "${workspaceFolder}/main.exe", "-I", - "${workspaceFolder}\\include" + "${workspaceFolder}/include" ], "options": { "cwd": "${fileDirname}" diff --git a/README.md b/README.md index fafeba7..f2003e0 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,30 @@ # LanderCpp ## System Requirements -*Note: these are only necessary if you plan on messing around with the source code. If you just want to see the end result, you should be able to go into the build/release directory and run the executable with no problems* + +_Note: these are only necessary if you plan on messing around with the source code. If you just want to see the end result, you should be able to go into the build/release directory and run the executable with no problems_ + - Visual Studio Code / C++ Extension - mingw64 Compiler +- gdb debugger -For help with setting up your environment on Windows, reference this site: https://code.visualstudio.com/docs/languages/cpp -The json files are already configured, so if you need any assistance with installing things in the right places, I would reference tasks.json under the .vscode folder +The best way to install is by following this guide for [Windows](https://code.visualstudio.com/docs/cpp/config-mingw) or for [Linux](https://code.visualstudio.com/docs/cpp/config-linux) ## Overview -- Make sure to build from main.cpp + - main.cpp contains all of user defined initial conditions - sim.h contains all of the simulation calculations - As of right now, the executable just spits out a csv file... - Currently using simPlot.m to plot all of the data in the csv file. So I suggest having Matlab open while you're messing aound with this. ## Known Issues + - See issue tracker ## Results +These results are from the latest simulation automatically built with the code from the Master branch. To get code from the most recent commits go to [Pipelines](https://gitlab.com/lander-team/lander-cpp/-/pipelines) where you can download the artifacts from each commit. + Download the raw CSV: https://lander-team.gitlab.io/lander-cpp/simOut.csv Download Linux Binaries: https://lander-team.gitlab.io/lander-cpp/sim.out