Question
· Feb 9

VS Code Debug issue Extent Info getting built into class code on server

I save / compile a class and instantly run a debug.  No issue

A few seconds later, try to run the same debug and get presented with either: 

1) Target Source is not compiled (Open launch json) dialog box

                                                    OR

2) The version of the file on the server is newer.

In the meantime I have made no edits to the VS Code window at all. 

If I pull a compare in response to #2 above, I am presented with a bunch of extent info built into the storage definition similar to the lines below. I'm sure it is a setting or configuration issue that I misunderstand (SQLMap perhaps?) , but have had no success in track down the annoyance. Any pointers would be greatly appreciated.

<ExtentSize>7</ExtentSize>

<IdLocation>^myclassD</IdLocation>

<IndexLocation>^myclassDI</IndexLocation>

<Property name="%%CLASSNAME">

<AverageFieldSize>2</AverageFieldSize>

<Selectivity>100.0000%</Selectivity>

</Property>

<Property name="%%ID">

<AverageFieldSize>22</AverageFieldSize>

<Selectivity>1</Selectivity>

</Property>

<Property name="EventNumber">

<AverageFieldSize>9</AverageFieldSize>

<Selectivity>20.0000%</Selectivity>

</Property>

<Property name="HL">

<AverageFieldSize>3</AverageFieldSize>

<Selectivity>50.0000%</Selectivity>

</Property>

<Property name="Instrument">

<AverageFieldSize>3</AverageFieldSize>

<Selectivity>100.0000%</Selectivity>

</Property>

<Property name="timeIndex">

<AverageFieldSize>6</AverageFieldSize>

<Selectivity>100.0000%</Selectivity>

</Property>

<Property name="ColorPrice">

<AverageFieldSize>5</AverageFieldSize>

<Selectivity>16.6667%</Selectivity>

</Property>

<Property name="SDH">

<AverageFieldSize>7</AverageFieldSize>

<Selectivity>100.0000%</Selectivity>

</Property>

<Property name="Seq">

<AverageFieldSize>3</AverageFieldSize>

<Selectivity>25.0000%</Selectivity>

</Property>

<SQLMap name="I1">

<BlockCount>-4</BlockCount>

</SQLMap>

<SQLMap name="I2">

<BlockCount>-4</BlockCount>

</SQLMap>

Product version: IRIS 2023.2
$ZV: IRIS for UNIX (Ubuntu Server 22.04 LTS for x86-64) 2023.2 (Build 227U) Mon Jul 31 2023 18:09:44 EDT
Discussion (4)2
Log in or sign up to continue

Hi,

It seems that is a problem with your VS Code.

Could you check that you have updated the Intersystems ObjectScript extensions?

https://marketplace.visualstudio.com/items?itemName=intersystems-communi...

When you save and compile your code, in the case of a persistent class, it adds the SQLMap, but it is retrieve in this moment.

Check your configuration, I have setted the following one:

Intersystems ObjectScript

✔ Auto Adjust Name

✔ Compile Flags: cuk

 Compile On Save

And this configuration of export in .code-workspace

"objectscript.export": {
	"folder": "src",
	"addCategory": false,
	"map": {},
	"atelier": true,
	"generated": false,
	"filter": "",
	"exactFilter": "",
	"category": "*",
	"noStorage": false,
	"dontExportIfNoChanges": false,
	"maxConcurrentConnections": 0,
	"mapped": true
}

Let me know if it works

Best Regads

Hi Kurro,  Thanks for the reply. Running latest ObjectScript  Extensions

Autoadjust & Compile on Save are ticked.
I run ck flags to  fix an alternate problem (Make an edit only to comment and then the debugger doesn't rebuild and can't start interactive debugging, so I rebuild always until that is fixed)

.export settings all match. 

So still trying to track it down..

I'm guessing you are using the client-side editing paradigm, creating a new Foo/Bar.cls file (probably in the src subfolder of the folder you opened in VS Code), defining Foo.Bar as a subclass of %Persistent. Then when you save it VS Code imports the class into the namespace of the server your configuration connects to. When it compiles this for the first time the server adds the storage definition. VS Code should automatically reload the updated class definition into your local file.

When you begin a debugging session VS Code by default saves modified documents before launching server-side execution of your code.

None of this should produce the symptoms you reported. I recommend moving the investigation to the extension's Issues section in its GitHub repository. A good way of opening an issue there is to begin at the Report Issue option from VS Code's Help menu. This will automatically include version information in the report. You can't paste screenshots or animated GIFs into that dialog but it's easy to edit the issue description on the GitHub page that opens after the dialog closes.

Thanks John. Your guess is correct. client side editing paradigm and %Persistent. Initial save works exactly as planned. Updates the storage definition and reloads the updated definition. Where it gets weird (new info from sleuthing attempts) is if I run a SQL query in the management portal, that's when the extent info gets injected. Then when I subsequently try an inline debug (no edits to the code at all)  I am presented with the Target Source is not compiled (Open launch json) dialog box. Then when I try to save, I get the popup that source on the server is newer and when I do a compare I get results that show extent info has been injected. I actually went ahead and opened a WRC ticket so I'll refrain from opening the issue in github for the moment unless they can't get anywhere.   Will be sure to update the thread when answer gets tracked down. 

Best regards,

Sinon