Skip to content

Commit

Permalink
Merge pull request #5515 from snyk/docs/add-debug-guide
Browse files Browse the repository at this point in the history
docs(contributing): add section on setting up debugger
  • Loading branch information
sandor-trombitas authored Oct 2, 2024
2 parents ada3165 + 028949f commit cb61474
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ Run the build binary like this.
./binary-releases/snyk-macos --version
```

## Debugging the go binary with VSCode

1. Build the cli using `make build-debug`

2. Save the `Installing` path from the build output

3. Open your `.vscode/launch.json` file and add the following under `configurations`

```json
{
"name": "Attach to Go Process",
"type": "go",
"request": "attach",
"mode": "local",
"remotePath": "<your Installing path>"
}
```

4. Add your break points

5. Run the cli from your build path, you will see a prompt to attach a Debugger

6. Run "Attach to Go Process" from under your debug tab

## Running tests

You can run tests using standard Jest commands. See: [Jest CLI docs](https://jestjs.io/docs/cli).
Expand Down

0 comments on commit cb61474

Please sign in to comment.