Viewing MATH_NUMERIC and JDEDate in the C Debugger

jolly

Reputable Poster
Here's a great tip for those unfortunates amongst us who debug C BSFNs:

Ever get sick of having to expand MATH_NUMERICs and JDEDATEs in the watch and variables window? Well, there's an (almost) undocumented feature in MSDev that allows you to customise how specific structure and class types are displayed. See http://msdn.microsoft.com/library/d...l/vchowDisplayingElementsOfCustomDataType.asp

Basically if you place the following at the end of the Microsoft Visual Studio\Common\MSDev98\BinAUTOEXP.DAT file

; for use with JDE
tagMATH_NUMERIC=<Sign,c><String,s> length=<nLength> Decimal Pos=<nDecimalPosition>
tagJDEDATE=<nDay>/<nMonth>/<nYear>

Then you will see a useful representation of these types in the debugger window without expanding them.

Thanks to the legendary Mike Maguire for being so bored at work that he discovered this!

[wink]

Cheers,
JohnO
 

maguirem

Member
There is a way to colour code your special JDE keywords in 'C' business functions when using Visual Studio.
You may have noticed how 'Studio colour codes comments green and keywords in blue. You can make JDE keywords another colour as follows:


Create a file called:
C:\program files\Microsoft Visual Studio\Common\MSDev98\Bin\usertype.dat
as per the attached sample (make sure it is in the same directory as msdev.exe)

Then in Visual Studio go to the Tools->Options and take the Format Tab
Set the colour for user defined types to be whatever you like (eg Red) and you have all JDE keywords highlighted!!

Regards

Mike
 

Attachments

  • 36094-usertype.dat
    4.5 KB · Views: 2,173

Christian Audet

Moderator
Staff member
John and Mike,

I think that's a great trick I was also tired to click on the + (plus) sign to see the math numeric and date.

Maybe not tired enought to look for a nice feature like this.

I will right away sugest to Sef to include this in the Tips & Trap

Christian Audet
 
Call Orchestrations From Excel – The Easy Way to Make the Orchestrator Work for You.

Sef

VIP Member
Will do!
As soon as the community at large has had the opportunity to read this thread and try for themselves, I'll move it.

Thanks very much John & Mike. Things have been a bit quiet on the tips and traps front, so it's good to see such a great new contribution.
 
Top