Bug: Modern debugging template - Expanding/collapsing not working in certain cases

Reporting bugs in Modern.cfc, tested on Lucee 6.1.1.118:

  • If multiple queries are ran with the same file and line number, none of them are expandable/collapsable because they all have the same HTML element IDs.
  • If more than ~18 queries (31 sections, includes 13 hardcoded) are ran, expanding/collapsing any query from the 19th onwards isn’t working, due to the hardcoded bitmaskAll and due to the int32 limit being exceeded, requiring BigInt.

Example code to reproduce this (with your own datasource/table):

<cfloop index="i" from="1" to="50">
    <cfquery name="LOCAL.qryRows" datasource="testdatasource">
    SELECT 1 FROM exampletable
    </cfquery>
</cfloop>

This will show 50 queries in the debugger, all of which have the same file and line number.

I opened a PR to fix this, which increases the limit from 18 to around 100, but ideally I would prefer that there be no limit. So a different approach is needed.

EDIT: Opened LDEV-5315