debug variable watch

I have a break in my code and I want to see the value of a variable which is a Picture. It takes several steps to get to the contents of the picture item.

Is there a way to set a “Watch” or something so the value of that variable is always visible at the break.

As an aside, just before the break, I set a canvas on the window to the value of the picture but it displays a blank. The value of the contents of the same variable after the break has the correct image. The code around the break is:

sSQL = "SELECT * FROM RootPixels WHERE uuid = " + "'" + sUUID + "'" rsLR_Temp = dbLR_rootPixels.SQLSelect(sSQL) if dbLR_Previews.Error then sMsg = "Error 'reading from RootPixels from dbLR_Previews - " + dbLR_Previews.ErrorMessage MsgBox(sMsg) UpdateLog(CurrentMethodName, sMsg) quit Return end if pImage = rsLR_Temp.Field("jpegData").PictureValue cPreview.Backdrop = pImage Break sColorProfile = rsLR_Temp.Field("colorProfile").StringValue

Okay, the canvas just needed a refresh. The canvas is now displaying the correct value.

I still want to be able to “watch” a variable but the root problem I have is somewhere else…

I assume you mean a property, not a variable, since a variable will be visible immediately in the debugger.

If the property holds an object, you can assign it to a variable in your code, then assign that variable to the property at the end of your code, something like this:

dim p as picture = rsLR_Temp.Field("jpegData").PictureValue
cPreview.Backdrop = p
sColorProfile = rsLR_Temp.Field("colorProfile").StringValue

pImage = p

Sorry I did mean a property