You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,11 +226,19 @@ If your project is using this library feel free to submit a PR or send a message
226
226
227
227
### Debugging
228
228
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
+
230
235
Side-note: The tag isn't called `debug` to avoid naming conflicts with other libs (and underscores in tags don't work, apparently).
231
236
232
237
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
234
242
235
243
Check out `debug_on.go` for any other settings that can be changed.
0 commit comments