Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 0d65830

Browse files
authored
Merge pull request #641 from datafold/vscode_debug_setup_doc
add debugging detail for VSCode
2 parents edaf565 + 2e2520e commit 0d65830

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,43 @@ You can adjust how many rows we benchmark with by passing `N_SAMPLES` to `dev/be
162162
```shell-session
163163
$ N_SAMPLES=100000000 dev/benchmark.sh # 100m which is our canonical target
164164
```
165+
166+
## VSCode Setup
167+
To debug using the unit tests in VSCode, add the following files to a `.vscode` directory in the root of the repo
168+
169+
`launch.json`
170+
```
171+
{
172+
"version": "0.1.0",
173+
"configurations": [
174+
{
175+
"name": "Debug Unit Test",
176+
"type": "python",
177+
"request": "test",
178+
"justMyCode": true,
179+
}
180+
]
181+
}
182+
```
183+
184+
`settings.json`
185+
```
186+
{
187+
"python.testing.unittestArgs": [
188+
"-v",
189+
"-s",
190+
"",
191+
"-p",
192+
"test_*.py"
193+
],
194+
"python.testing.pytestEnabled": false,
195+
"python.testing.unittestEnabled": true,
196+
}
197+
```
198+
You should see that the tests are now appearing in the test explorer view:
199+
200+
![asdf](/docs/debug_example.png)
201+
202+
This will allow you to run tests in the IDE, debug them, and hit breakpoints.
203+
204+
Note that some tests require that you have the docker containers mentioned above running in order to pass.

docs/debug_example.png

225 KB
Loading

0 commit comments

Comments
 (0)