Question: In complex 1C:Enterprise Platform configurations such as Drive or ERP, from time to time I have to check the code from the designer with an effort to understand how a certain mechanism works, so that I can modify or fix it. Many times, I encounter queries with too many lines of text and containing several temporary tables. Is there an easier, practical way of making sense of what those queries do?
Answer: A practical way of trying to make out how a given complex query works is checking the data of the temporary tables which are constructed in the query. However, by default the platform do not let us to see the data of the temporary tables, it only allows us to see the final data, the result (or results, if there are more than one batch in the query) of the query. With a little trick though, we can get access to temporary tables data of the query via the “Evaluate expression” debugging functional. Here is how it is done.
Also please note that you should use this trick on a personal copy of the database, and not on the working live database as the method needs enabling modifications to the configuration.