Skip to content

Commit

Permalink
doc: add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax committed Sep 17, 2024
1 parent e8efd72 commit e70d5ce
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions DEBUG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Debug

The recommended way to debug a packer plugin is adding prints and running with logs enabled.
As written in [packer debug documentation](https://developer.hashicorp.com/packer/docs/debugging), you can use `PACKER_LOG=1` to enable verbose logging.

## Testing local build

To test a local build, you need to have the plugin in the same folder where you will run packer:


```
> ls
packer-plugin-scaleway build_scaleway.pkr.hcl
> PACKER_LOG=DEBUG SCW_DEBUG=1 packer build build_scaleway.pkr.hcl
...
```

0 comments on commit e70d5ce

Please sign in to comment.