MicroStation MSDebug File


 Product:MicroStation
 Version:SE, /J, V8
 Environment:N\A
 Area:Configuration
 Subarea:Workspaces

Problem

How do I produce an MSDebug file from MicroStation?

Solution

Operating System: ALL (that are certified to run the versions of MicroStation above)
Document Number: 8227

What is an MSDebug file?

An MSDebug.txt file is the output created from running the ustation.exe with the -debug switch. The information that gets dumped to the file contains a list of all the configuration files that run, and what variables where set by each file. The -debug switch creates the msdebug.txt file in the same directory where the ustation.exe file is located. The directories for specific versions of MicroStation are outlined below.

1. Default location for MicroStation V8 - C:\program files\Bentley\Program\MicroStation
2. Default location for MicroStation J - C:\Bentley\Program\Microstation
3. Default location for MicroStation 95\SE - C:\win32app\ustation

How to create an MSDebug?

You can create the msdebug.txt file several ways. To create an MSDebug.txt file, start MicroStation with the -debug parameter:

1. From a DOS prompt \Command Window
Go to a Command prompt and change to the directory where ustation.exe is
located and type the following command: ustation -debug

Examples:

For MicroStation V8 - c:\program files\Bentley\Program\Microstation\ustation - debug
For MicroStation J - c:\bentley\program\microstation\ustation -debug
For MicroStation 95\SE - c:\win32app\ustation\ustation -debug

You should get a DOS window that says "Debugging output saved to [msdebug.txt]".

Hit the escape key.

Locate the msdebug.txt file in the appropriate directory.

2. From the MicroStation shortcut icon insert a -debug switch into the MicroStation shortcut.

Examples:

For MicroStation V8 - Shortcut TARGET: "javascript:void(null);" -debug
For MicroStation J - Shortcut TARGET: "javascript:void(null);" -debug
For MicroStation 95\SE - Shortcut TARGET: "javascript:void(null);" -debug

Save the changes and then double click the icon.
You should get a DOS window that says "Debugging output saved to [msdebug.txt]".
Hit the escape key.
Locate the msdebug.txt file in the appropriate directory.


NOTE: Remember to remove the switch from the icon after creating the
MSDebug.txt file.


3. From the Windows "Run" command window
Choose Start > Run
Type the path to the ustation.exe file

Examples:

For MicroStation V8 - c:\program files\Bentley\Program\Microstation\ustation.exe -debug
For MicroStation J - c:\Bentley\Program\MicroStation\Ustation.exe -debug
For MicroStation 95\SE - c:\win32app\ustation\ustation.exe -debug

Click OK.

You should get a DOS window that says "Debugging output saved to [msdebug.txt]".

Hit the escape key

Locate the msdebug.txt file in the appropriate directory.

How to make use of the MSDebug file?

There are basically two sections to the MSDebug file. The first section contains a list of all the configuration files that run, and what variables were set by each file. Each configuration file that gets run has a starting point and an ending point identified as follows:

1. Processing macro file [C:\Bentley\Program\MicroStation\config\mslocal.cfg]

2. End of macro file [C:\Bentley\Program\MicroStation\config\mslocal.cfg]

Located in-between these two lines are all variables and their settings that get loaded from that particular configuration file:

Examples:

Processing macro file [d:\Bentley\Program\MicroStation\config\system\mslocale.cfg]

(system): MS_SPELLINGLANGUAGE=AmericanEnglish [AmericanEnglish]

(system): MS_HELPLOAD_LANGUAGE=en [en]

End of macro file [d:\Bentley\Program\MicroStation\config\system\mslocale.cfg]

Processing macro file [d:\Bentley\Program\MicroStation\config\appl\qvisgl.cfg]

(appl): MS_GRAPHICSACCELERATOR=qvisgl [qvisgl]

End of macro file [d:\BentleyProgram\MicroStation\config\appl\qvisgl.cfg]

It also indicates at what level the variable has been set, i.e. system, appl, user, site, project, or predefined.

Below is a list of default configuration files that should be listed in the MSDebug.txt:

 

The last section of the MSDebug.txt file is the Configuration Variable Summary

Here you will find the following:

1. A listing of all configuration variables
2. At what level each variable was set
3. The full path to the location of the files
4. Whether or not the variable is locked or unlocked

Using the MSDebug.txt file to help trouble shoot Processor exception errors

The msdebug file can help you trouble shoot Processor exception errors by helping you find where specific files are located. The steps for this procedure are
listed below:

1. Create the msdebug.txt file and then open it in notepad.
2. Search for the following variables using the Search > Find drop down menu, in notepad:

MS_USERPREF (this will tell you where your user preference file is located)

MS_INITAPPS (this will tell you if any other programs are being initiated during startup)

MS_SYMBRSRC (this will point you to the location where all the MicroStation resource files are located)

MS_DGNAPPS (this will tell you what other programs are being launched with MicroStation)

MS_DGNMACROS (this will tell you what macros are being launched with MicroStation)

_USTN_UIPATH (this will tell you the location of any *.m0* files)

3. Be sure to click the "next" button in the Search dialog box to be sure you find all instances of the variables.

See also

Other language sources

 Original Author:Elisa Pry