How to get query range value in Ctrl + G or standard filter on form in AX

After super() in excuteQuery() method in AX add this following code:
AX 2009:
info(YourDataSource_Ds.queryRun().query().dataSourceNo(1).toString());

AX 2012:
 info(YourDataSource_Ds.queryRunQueryBuildDataSource().toString());

or

q = YourDataSource_Ds.queryRun().query();
for (i = 1; i <= q.queryFilterCount(); i++)
{
    qf = q.queryFilter(i);
    info(strFmt("%1: %2", qf.field(), qf.value()));
}