You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/getting-started.md
+17-2
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@
18
18
*[Installing CLion](#installing-clion)
19
19
*[Getting your Student License](#getting-your-student-license)
20
20
*[Installing CLion](#installing-clion-1)
21
+
*[Installing VSCode](#installing-vscode)
21
22
*[Building and Running the Code](#building-and-running-the-code)
22
23
*[Debugging](#debugging)
23
24
*[Profiling](#profiling)
@@ -89,7 +90,7 @@ We have several setup scripts to help you easily install the necessary dependenc
89
90
90
91
### Installing CLion
91
92
92
-
CLion is our main IDE for editing our C/C++ code. It is designed to work with our build system, `bazel`, and has all the great features of an IDE such as code completion, syntax highlighting etc. We **strongly** recommend installing CLion and using it for development.
93
+
CLion is our main IDE for editing our C/C++ code. It is designed to work with our build system, `bazel`, and has all the great features of an IDE such as code completion, syntax highlighting etc. If you are running Software on an ultrabook or a virtual machine, see [Installing VSCode](#installing-vscode)for a less resource intensive option.
93
94
94
95
#### Getting your Student License
95
96
@@ -105,6 +106,15 @@ CLion is free for students, and you can use your UBC alumni email address to cre
105
106
* Run `./install_clion.sh` (***DO NOT** download CLion yourself unless you know what you're doing. The `install_clion.sh` script will grab the correct version of CLion and the Bazel plugin to ensure everything is compatible *).
106
107
* When you run CLion for the first time you will be prompted to enter your JetBrains account or License credentials. Use your student account.
107
108
109
+
### Installing VSCode
110
+
111
+
1. Inside a terminal, navigate to the environment_setup folder. Eg. `cd path/to/the/repository/Software/environment_setup`
112
+
2. Run `./install_vscode.sh` (***DO NOT** download VSCode yourself unless you know what you're doing. The `install_vscode.sh` script will grab the most stable version of VSCode)
113
+
3. Open `vscode`. You can type `vscode` in the terminal, or click the icon on your Desktop.
114
+
&. Click `Open Folder` and navigate to where you cloned software. So if I cloned the repo to `/home/my_username/Downloads/Software`, I would select `/home/my_username/Downloads/Software`.
115
+
4. VSCode will prompt you to install recommended extensions, click `Install`, this installs necessary plugins to work on the codebase. (Bazel, C++, Python, etc..)
116
+
5. Navigate to File -> Preferences -> Settings -> Workspace -> Extensions -> Bazel and select the `Bazel: Enable Code Lens` option.
117
+
108
118
## Building and Running the Code
109
119
110
120
### From the command-line
@@ -129,7 +139,6 @@ First we need to setup CLion
129
139
6. Change the Project Name to whatever you want. Leave everything else as it is ("Use shared project view file" should be selected).
130
140
7. Click `Finish` and you're good to go! Give CLion some time to find everything in your repo.
131
141
132
-
133
142
Now that you're setup, if you can run it on the command line, you can run it in clion. There are two main ways of doing so.
134
143
1. Open any `BUILD` file and right clight in a `cc_library()` call. This will give you the option to `Run` or `Debug` that specific target. Try it by opening `Software/src/software/geom/BUILD` and right-clicking on the `cc_library` for `angle_test`!
135
144
2. Add a custom build configuration (more powerful, so make sure you understand this!)
@@ -138,6 +147,12 @@ Now that you're setup, if you can run it on the command line, you can run it in
138
147
3. For `Target Expression`, you can put anything that comes after a `build`, `run`, `test`, etc. call on the command line. For example: `//software/geom:angle_test`.
139
148
4. For `Bazel Command` you can put any bazel command, like `build`, `run`, `test`, etc.
140
149
5. Click `Ok`, then there should be a green arrow in the top right corner by the drop-down menu. Click it and the test will run!
150
+
151
+
### With VSCode
152
+
1. Open VSCode
153
+
2. Navigate to `Software/src/software/geom/BUILD`
154
+
3. On top of every `cc_test`, `cc_library` and `cc_binary` there should be a `Test ...`, `Build ...` or `Run ...` for the respective target.
155
+
4. Click `Test //software/geom:angle_test` to run the `angle_test`
141
156
142
157
### Running our AI, Simulator or Robot Diagnostics
0 commit comments