How to check if i am in debug mode of Q session.

I am new to kdb. and using sometimes q session thruws exceptions when i try to execute some queries. where the connection is already open from last day (more then 24 hours.). during my function writing i get an experience if some function threw error that create a } at console something like 
q}} which is like in debug mode. i am using C# interface to work with kdb+. 

when error comes in console. 


'type

@

-1

(“A”;“p”;“p”;“r”;“o”;“v”;“e”;“d”;“:”;" ";“10000”)

q)) // in debug mode.

The question is how whould i know if i am already in debug mode. of Q session. ?

Thanks

J S

Hi,

FYI - http://code.kx.com/wiki/Startingkdbplus/qlanguage#2.4\_Console\_Modes 

When a function breaks it goes into debug mode. One way you can check if you are in debug mode of a function, is by asking if .z.s is null.

e.g.

q)f:{2+`a}

q)f

{2+`a}

'type

2

`a

q)).z.s

{2+`a}

q))if[not null .z.s;0N!"you are in debug mode of ",string .z.s]

“you are in debug mode of {2+`a}”

More advanced usage here - http://www.kdbfaq.com/kdb-faq/tag/zs

HTH,

Sean

Thanks Sean.