<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to debug Pure MDL?</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl</link><description>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&amp;#39;s guide, but didn&amp;#39;t find too much beside the instruction</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569597?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2020 17:52:52 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5d82bfe3-37e3-4e8d-a578-9ab63ee368f6</guid><dc:creator>Sui Huang</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;I understand the situation now. Thank you for your explanation.&lt;/p&gt;
&lt;p&gt;Sui&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569580?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2020 16:15:14 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d1962a4e-9780-4677-bd7b-85958506fee6</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Sui,&lt;/p&gt;
[quote userid="1039982" url="~/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl/569572"]When you mention &amp;quot;MDL pseudocode&amp;quot;[/quote]
&lt;p&gt;I use &amp;quot;pseudocode&amp;quot; for compiled version (.mo, linked to .ma), as .mc is usually referred as MDL source coude.&lt;/p&gt;
&lt;p&gt;The problem with &amp;quot;MDL&amp;quot; name itself is that because of long history and technological changes, MDL today means &amp;quot;anything related to MicroStation development&amp;quot;, whereas in history it was C-like language, later extended by MDL API, which has become available also as native code... ;-)&lt;/p&gt;
[quote userid="1039982" url="~/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl/569572"]If you are referring to the later, does it mean I can interactively debug the .mc code with Visual Studio?[/quote]
&lt;p&gt;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).&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569572?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2020 16:03:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d923daa3-ee68-4a18-b32b-42071fd26d82</guid><dc:creator>Sui Huang</dc:creator><description>&lt;p&gt;Hi Jan,&lt;/p&gt;
&lt;p&gt;When you mention &amp;quot;MDL pseudocode&amp;quot;, 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?&lt;/p&gt;
&lt;p&gt;If you are referring to the later, does it mean I can interactively debug the .mc code with Visual Studio?&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sui&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569172?ContentTypeID=1</link><pubDate>Sun, 16 Feb 2020 19:41:12 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:2cc63b0d-ee0f-4c43-9c36-d36aa85c9001</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Sui,&lt;/p&gt;
[quote userid="1042803" url="~/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl"]Is there other tool or instruction that can help me?[/quote]
&lt;p&gt;as Jon answered already, MDL pseudocode debugging is pretty limited and text-only.&lt;/p&gt;
&lt;p&gt;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&amp;#39;s possible to use Visual Studio to debug the code. It&amp;#39;s hard to guess without knowing context and the application lifecycle, but maybe the benefit will be bigger than investment to the code migration.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569171?ContentTypeID=1</link><pubDate>Sun, 16 Feb 2020 19:32:21 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a6197988-b2ea-432f-9f02-e56e190e0769</guid><dc:creator>Jan Šlegr</dc:creator><description>[quote userid="2269" url="~/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl/569156"]This answers your question about debugging MDL in MicroStation V8&lt;em&gt;i&lt;/em&gt; and earlier.&amp;nbsp; With MicroStation CONNECT, we can use the Viz Studio debugger for .NET and C++ development.[/quote]
&lt;p&gt;This is not precise formulation in my opinion. It&amp;#39;s possible to use Visual Studio debugger in V8i without any issue as well! The only unsupported option is the discussed MDL pseudocode.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569165?ContentTypeID=1</link><pubDate>Sun, 16 Feb 2020 16:33:42 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:5b618101-2480-402f-ac27-e58d0a2e1bac</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1042803" url="~/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl/569163"]Then seems typing DEBUG in key-in is the only way[/quote]
&lt;p&gt;If your question is: &amp;quot;Is there an interactive MDL debugger?&amp;quot; then the answer is &lt;em&gt;no&lt;/em&gt;.&amp;nbsp; MDL was invented around 1990, and reflects the technology of that era.&amp;nbsp; These days we can develop using VBA, .NET or C++ and there are interactive debuggers available for those languages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569163?ContentTypeID=1</link><pubDate>Sun, 16 Feb 2020 15:48:06 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:52d461b1-5e8f-469f-bcd9-83ea8b2089e9</guid><dc:creator>Sui Huang</dc:creator><description>&lt;p&gt;Hi Jon,&lt;/p&gt;
&lt;p&gt;Then seems typing DEBUG in key-in is the only way, I will try it. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Pure MDL?</title><link>https://communities.bentley.com/thread/569156?ContentTypeID=1</link><pubDate>Sun, 16 Feb 2020 09:44:36 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8a25ccae-023a-4172-9ca9-3eb92aedb612</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1042803" url="~/products/programming/microstation_programming/f/microstation-programming---forum/192513/how-to-debug-pure-mdl"]I tried to find a way to debug in the SDK programmer&amp;#39;s guide[/quote]
&lt;p&gt;Search help for keyword &lt;em&gt;debug&lt;/em&gt;.&amp;nbsp; Here&amp;#39;s the first of several sections about debugging in the &lt;em&gt;MDL Programmer&amp;#39;s Guide.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;Debugging The first time a particular MDL application is to be debugged, its name must be specified. To load an application and activate the MDL debugger from MicroStation, key in the following, where is the application name: &lt;/cite&gt;&lt;/p&gt;
&lt;pre&gt;MDL LOAD DEBUG &lt;em&gt;APPLICATION&lt;/em&gt; &lt;/pre&gt;
&lt;p&gt;&lt;cite&gt;To debug a previously loaded application, key in the following:&lt;/cite&gt;&lt;/p&gt;
&lt;pre&gt;MDL DEBUG &lt;em&gt;APPLICATION&lt;/em&gt;&lt;/pre&gt;
&lt;p&gt;&lt;cite&gt;The application name is an optional part of the command, and need only be specified if the MDL application is unloaded, or another MDL application has been loaded since you last debugged the first application. If the application is loaded with the MDL LOAD command without the DEBUG modifier, MDL loads the symbol table before activating the debugger. Otherwise, it only activates the debugger. MDL DEBUG operates as an immediate command. It does not disrupt the state of the currently active MicroStation command.&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;It is possible to have debugging information loaded for more than 1 application at a time, but the debugger can only be in command mode for 1 application at a time. For example, it is possible to load 3 MDL applications with debugging, but when the debugger prompts for a command it is only possible to set breakpoints and display values for the same application.&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;The mdlSystem_enterDebug function activates the debugger from an MDL application. If the application does not have the debugging information loaded, MDL loads the symbol table.&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;This answers your question about debugging MDL in MicroStation V8&lt;em&gt;i&lt;/em&gt; and earlier.&amp;nbsp; With MicroStation CONNECT, we can use the Viz Studio debugger for .NET and C++ development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>