Debug prints in GSQL

Hi all!

I have a very general question about writing GSQL queries:
During the process of writing a query, where can I execute debug prints?

For example, I’d like to be able to see the values of local variables / aggregators during the ACCUM and POST-ACCUM stages.

I’ve been getting an “extraneous input print…” error message.

Is it possible at all?

Thanks a lot,
Denis

Hi Denis,

there are two ways of debugging.
Using LOG statement:
https://docs.tigergraph.com/dev/gsql-ref/querying/output-statements-and-file-objects#log-statement

or using output to the file:
https://docs.tigergraph.com/dev/gsql-ref/querying/declaration-and-assignment-statements#file-object-declaration
https://docs.tigergraph.com/dev/gsql-ref/querying/output-statements-and-file-objects

Best,
Bruno

Hi Bruno!

Thanks a lot for you answer!
I was hoping for something that sent the output to the UI, rather than the file, but I’ll make it work.

Thanks again!!! :smiley: