Skip to content

Commit e191a95

Browse files
authored
readme: layout of debug section
1 parent 220c384 commit e191a95

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,19 @@ If your project is using this library feel free to submit a PR or send a message
226226

227227
### Debugging
228228

229-
You can use the build tag `debugdemoinfocs` (e.g. `go run -tags debugdemoinfocs examples/print-events/print_events.go -demo example.dem`) to print out debugging information - such as game events or unhandled demo-messages - during the parsing process.<br>
229+
You can use the build tag `debugdemoinfocs` to print out debugging information - such as game events or unhandled demo-messages - during the parsing process.<br>
230+
231+
e.g.
232+
233+
go run -tags debugdemoinfocs examples/print-events/print_events.go -demo example.dem
234+
230235
Side-note: The tag isn't called `debug` to avoid naming conflicts with other libs (and underscores in tags don't work, apparently).
231236

232237
To change the default debugging behavior, Go's `ldflags` parameter can be used. Example for additionally printing out all server-classes with their properties: `-ldflags="-X 'github.com/markus-wa/demoinfocs-golang/v3/pkg/demoinfocs.debugServerClasses=YES'"`.
233-
e.g. `go run -tags debugdemoinfocs -ldflags="-X 'github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs.debugDemoCommands=YES'" examples/print-events/print_events.go -demo example.dem`
238+
239+
e.g.
240+
241+
go run -tags debugdemoinfocs -ldflags="-X 'github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs.debugServerClasses=YES'" examples/print-events/print_events.go -demo example.dem
234242

235243
Check out `debug_on.go` for any other settings that can be changed.
236244

0 commit comments

Comments
 (0)