diff --git a/developer/setup/vscode.md b/developer/setup/vscode.md index a3c97fb62..545e58a04 100644 --- a/developer/setup/vscode.md +++ b/developer/setup/vscode.md @@ -12,7 +12,7 @@ You will first need to inst Now you will need to install three extensions to get RevBayes to work nicely. To do this click on the button shown below in VSCode. - +Location of Extension button in VSCode Getting RevBayes working ------------------------ @@ -22,4 +22,18 @@ Now that these are installed, CMake tools will prompt in the lower right asking Once the CMake build finishes, you can setup debugging by clicking the triangle with the small beatle in the lower left. Now click on the gear shown below. This will open a new file called `launch.json`. You need to change the values for the `"program:"` object to the path where your `rb` executeable is. For example, `"${workspaceFolder}/build/rb"`. In VSCode `${workspaceFolder}` refers to the root folder of the project you opened (unless you have changed the folder's name, this is most likely `revbayes`). To test a specific rev script, change the value of the `"args"` object to a location of a Rev script. With that you can use debugging in VSCode by pressing the play button on the debug panel, or using the command palette (Ctrl+Shift+P or CMD+Shift+P) and using the "CMake: Debug" command. VSCode will then run the file you added to `"args"`, but stop the process whenever it reaches a line you have set with a breakpoint (i.e. where you have clicked to the left of the line number, adding a small red dot). When stopped at a breakpoint, you can use the debugging panels to investigate variables and functions to debug your program. - +Location of Debug command in VSCode + +If you encounter the error `BOOST_ROOT not set`, create a file `.vscode/settings.json` with the content + +```json +{ + "cmake.environment": { + "BOOST_ROOT": "C:/Program Files/Boost/boost_1_86_0", + "BOOST_LIBRARYDIR": "C:/Program Files/Boost/boost_1_86_0/lib" + } +} +``` + +Update each path to match the location of your own Boost installation. +