| 1 | {/* AUTO-GENERATED — do not edit. Synced by scripts/sync-developer-docs.mjs from docs/debugging.md (smbcloud-cli, main). */} |
| 2 | |
| 3 | # VSCode Debugging |
| 4 | |
| 5 | import { Callout } from 'nextra/components' |
| 6 | |
| 7 | <Callout type="info"> |
| 8 | Synced from [`docs/debugging.md`](https://github.com/smbcloudXYZ/smbcloud-cli/blob/main/docs/debugging.md) on the `main` branch of |
| 9 | [smbcloud-cli](https://github.com/smbcloudXYZ/smbcloud-cli). Edit it there. |
| 10 | </Callout> |
| 11 | |
| 12 | To debug the app on VSCode, use [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) and [cargo debugger](https://github.com/jkelleyrtp/cargo-debugger). |
| 13 | |
| 14 | ```bash |
| 15 | $ cargo debugger --package smbcloud-cli -- account signup |
| 16 | ``` |
| 17 | |
| 18 | ## Environment |
| 19 | |
| 20 | Default environment is production. To run against dev environemt: |
| 21 | |
| 22 | ```bash |
| 23 | $ cargo run -p smbcloud-cli -- -e dev account login |
| 24 | ``` |
| 25 | |
| 26 | Example debug the dev environment: |
| 27 | |
| 28 | ```bash |
| 29 | $ cargo debugger --package smbcloud-cli -- -e dev account login |
| 30 | ``` |
| 31 | |
| 32 | ## Run from different directory |
| 33 | |
| 34 | To run from a different directory, use the `--manifest-path` flag and `--package` flag. : |
| 35 | |
| 36 | ```bash |
| 37 | $ cargo debugger --manifest-path .../path/to/smbcloud-cli/Cargo.toml --package smbcloud-cli -- -e dev account login |
| 38 | ``` |