If you use a custom class query %Library.Query type you may write your parameters to some
^mtemp.Evgeny($i(^mtermp.Egeny)) = ..... direct from the Execute method
or ^mtemp.Evgeny($h) = ....

For basic class query %SQL.Query () you may take the usual SQL approach

  • Create a SQL method that always returns 1 (TRUE)
  • You pass all your parameters into that method 
    • which does the ^mtemp trick and a QUIT 1
  • add to the WHERE clause  . . .  AND MYTRACE(par1,par2,---)=1

I refer to this a STATIC clause since it is only executed once by query
because of no reference to any column values 

It was my approach to SQL debugging
 

Class MyPackage.MyClass Extends (%Persistent, %JSON.Adaptor)
{
 Property JSONid As %Integer(%JSONFIELDNAME = "id");
 Property strprop As %String;
 Property boolprop As %Boolean;
}
                                                                           

next this worked

set jsn={  "id": 1,  "strprop": "string", "boolprop": true }
set sc=obj.%JSONImport(jsn)
zw obj
+----------------- general information ---------------
|      oref value: 2
|      class name: MyPackage.MyClass
| reference count: 1
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|             JSONid = 1
|           boolprop = 1
|            strprop = "string"
+-----------------------------------------------------

$system.SQL.SetIdentityInsert(1) is deprecated and replaced by $system..SQL.Util.SetOption(IdentityInsert ,1) 

from class docs:>>>
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.SQL.Util#METHOD_SetOption

IdentityInsert - Set the IDENTITY_INSERT option for this process. IDENTITY_INSERT
controls the ability of the user to specify a value for the IDENTITY property when
saving a new object, a value for the IDENTITY column, or an explicit ROWID value in an SQL INSERT.

Notes

  • Changing this configuration setting takes effect immediately and lasts for the duration of the process or until $SYSTEM.SQL.Util.SetOption("IsolationMode",pValue) is called again.
  • This is a per-process setting.

Sounds good to me 

As I expected, it's one of the new storage features that cause the irritation

/// Use hashed global names
Parameter USEEXTENTSET = 1

from docu  https://docs.intersystems.com/iris20253/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_storageglobals#GOBJ_storageglobals_hashed

When you set USEEXTENTSET to 1, each index is also assigned to a separate global, instead of using a single index global with different first subscripts. Again, this is done for increased performance.

Not explicitly mentioned - this also affects  IDKEY !

And the example presented shows in detail that 
IdLocation and DataLocation are NOT identical anymore, as it used to be for decades
 

You can get the required Global reference like this programmatically:

 ; get compiled class  with your classname
USER>set classname="oex.Dir"
USER>set dic=##class(%Dictionary.CompiledClass).%OpenId(classname)
 ; get relationship to CompiledStorage
USER>set stor=dic.Storages.GetAt(1)
 ; get name of the ID-Global
USER>Write stor.IdLocation
^oex.DirD
USER>

I'm surprised that   data is already imported via SQL but ^myclassD has no content.
So take a look into the related generated class:

Storage Default
{
<Data name="DirDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
- - - - - -
after all properties
</Data>
<DataLocation>^oex.DirD</DataLocation>
<DefaultData>DirDefaultData</DefaultData>
<ExtentSize>986</ExtentSize>
<IdLocation>^oex.DirD</IdLocation>
<IndexLocation>^oex.DirI</IndexLocation>

 <IdLocation> is the one to go for
with all the new Storage strategies (columnar, sharded, ...  )
This might be quite an exotic global name and rarely the traditional.

Happy New Year!
Here is a draft version of ZPretty.mac for ISIS
I'm not sure if this is worth to be public at all.

ZPretty ; make JSON readable
#; input= JSON string 
Do(input) public {
    if $e(input)="{" do ##class(%JSON.Formatter).%New().Format(input)
    else  write "<UNDEFINED>"
    quit ""
    }
tst  public ; 
    set jsn={"Name":"Li,Robert K.","SSN":"672-92-9664","DOB":"1975-01-12","Home":{"Street":"986 Washington Blvd","City":"Boston","State":"PA","Zip":"95802"},"Office":{"Street":"6012 First Place","City":"Reston","State":"MT","Zip":"77739"},"Spouse":{"Name":"Avery,Zelda H.","SSN":"323-13-7437","DOB":"1943-03-27","Home":{"Street":"196 Main Drive","City":"Youngstown","State":"WY","Zip":"53229"},"Office":{"Street":"4056 Franklin Court","City":"Bensonhurst","State":"IA","Zip":"27688"},"FavoriteColors":["Black"],"Age":77},"Age":45,"Title":"Associate Marketing Manager","Salary":10421}
    quit jsn 

ZPretty is not in OEX anymore for various version conflicts
But in IPM you may find this workaround left over.

user>zpm "install pretty-json-upd" 

For this and other incompatibilities introduced by version changes the
repo on GitHub is broken and not available until several fixes.
Workaround for the left over version is ZPM once again

USER>zpm "install objectscript-native-api"


Studio-2024.1.5.649.0-win.msi  is still available from WRC download for contracted customers
It works perfectly for me on  IRIS for Windows (x86-64) 2025.1