Hi MicroStation Programmers,
I am supporting a Pure MDL application (compiled with mcomp, etc) in V8i. How can I debug it? What tool can I use?
I tried to find a way to debug in the SDK programmer's guide, but didn't find too much beside the instruction of adding the "DEBUG" keyword in "MDL LOAD" key-in command.
Is there other tool or instruction that can help me?
Thank you!
Hi Sui,
Sui Huang said:Is there other tool or instruction that can help me?
as Jon answered already, MDL pseudocode debugging is pretty limited and text-only.
Because MDL in V8i is treated as obsolete, in my opinion there is a question whether it makes sense to migrate pseudocode to native C, where it's possible to use Visual Studio to debug the code. It's hard to guess without knowing context and the application lifecycle, but maybe the benefit will be bigger than investment to the code migration.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Jan,
When you mention "MDL pseudocode", are you referring to the code in the .mc file, which is human-readable C-like code? or the .ma file which is already compiled?
If you are referring to the later, does it mean I can interactively debug the .mc code with Visual Studio?
Sui
Sui Huang said:When you mention "MDL pseudocode"
I use "pseudocode" for compiled version (.mo, linked to .ma), as .mc is usually referred as MDL source coude.
The problem with "MDL" name itself is that because of long history and technological changes, MDL today means "anything related to MicroStation development", whereas in history it was C-like language, later extended by MDL API, which has become available also as native code... ;-)
Sui Huang said:If you are referring to the later, does it mean I can interactively debug the .mc code with Visual Studio?
Not quite. To use Visual Studio for debuggin, the application has to be native C/C++ code, which requires to migrate .mc to .cpp and to compile it using Microsoft VisualC compiler (Visual Studio 2005 Professional in the case of V8i).
Because the migration does not require to rewrite the whole application (but when the code is dirty, it can be a huge amount of work), in my opinion the advantage of debugging (and also much stricter check of the code by compiler), benefits are bigger than investment into migration.
I understand the situation now. Thank you for your explanation.