mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
docs: document recompiling V itself with debug info, debugging tests, and a tip for vscode (#10358)
This commit is contained in:
parent
8a497080b3
commit
eef445508f
@ -3860,6 +3860,11 @@ This will make V produce the `file.c` then stop.
|
||||
If you want to see the generated C source code for *just* a single C function,
|
||||
for example `main`, you can use: `-printfn main -o file.c`.
|
||||
|
||||
To debug the V executable itself you need to compile from src with `./v -g -o v cmd/v`.
|
||||
|
||||
You can debug tests with for example `v -g -keepc prog_test.v`. The `-keepc` flag is needed,
|
||||
so that the executable is not deleted, after it was created and ran.
|
||||
|
||||
To see a detailed list of all flags that V supports,
|
||||
use `v help`, `v help build` and `v help build-c`.
|
||||
|
||||
|
@ -81,6 +81,9 @@ or create the file `.vscode/launch.json`:
|
||||
}
|
||||
```
|
||||
|
||||
**Optional:** use `"program": "${fileDirname}/${fileBasenameNoExtension}"` to debug
|
||||
any current open source file with an existing binary with the same name but without any extention.
|
||||
|
||||
### Usage
|
||||
|
||||
To allow your compiled application to be debugged.
|
||||
|
Loading…
Reference in New Issue
Block a user