Visual Studio Add-in to Display MATH_NUMERIC correctly when Debugging

BOster

BOster

Legendary Poster
Post 89629 shows how to setup Visual Studio to display custom data types in the debugger when debugging C code in BSFNs/NERs/TERs. Its better then the default view but for the MATH_NUMERIC data type it simply puts all the relevant structure members on the first line. You still have to manually put all the pieces together to determine what the actual number is - namly the decimal position.

This VS addin will format the MATH_NUMERIC data type in the VS debbugger so that they appear as an actual number that is readable by humans (example screen shots in the download).

This addin is sort of a proto-type. I have only tested it with a limited number of configurations (OS/VS version/E1 Tools Release). I have been using it for about a month now without any problems. Post back here if you have any issues along with your system configuration. Deactivating/unistalling is pretty easy and straight forward should you have any issues. All instructions are included in the README file.
 

Attachments

  • 185194-JdeTypesVisualizer_0151.zip
    144.6 KB · Views: 131
Great work, Brian.

Unfortunately VS 2003 doesn't seem to work - the debugger shows a MathNumeric as {???} although it can still be expanded to its components.

The autoexp.dat does document the $ADDINS option so probably *should* work though.
 
Hmmm not sure if VS 2003 supports this feature or not (the custom visualizer addin). I would test it but I don't have a copy of VS 2003.

Could also be the E1 tools release. If the tagMATH_NUMERIC structure is different... or specifically a different total size in bytes then it might not work. If sizeof(tagMATH_NUMERIC) != 49 then that might be the issue.

Could also be that VS can't find JdeTypesVisualizer.dll. Make sure that it is in the same directory as devenv.exe although for VS 2003 it may be different???? Also make sure that your PATH environmental variable is set to your E1\system\bin32 folder. VS needs to load a dll out of the E1 bin32 folder.
 
I thought of one other thing. VS 2003 may use a different calling convention. For VS2008/2010 the documentation for $ADDINS was actually wrong. It didn't work. I had to change the calling convention in my DLL from what was documented. I wonder if the documentation was a hold over from 2003?
 
Back
Top