Search code examples
vb6pdb-files

How to compile a VB6 program with extra debugging information?


How to compile a VB6 program with extra debugging information (PDB file / symbols)?

If I just choose "Make DLL" from the File menu, no PDB file is created.


Solution

  • From https://support.smartbear.com/viewarticle/2357/

    Compiling Microsoft Visual Basic 6.0 Applications With Debug Information

    This topic explains how to compile Microsoft Visual Basic 6.0 applications with debug information...

    Visual Basic may include debug information in the executable file, or add debug info to an external PDB file. ...if you compile a release version of your product, it is recommended to generate debug information as an external file. This will decrease the overall size of your executable.

    To specify the way in which debug information will be generated, use the Link environment variable. If this variable is not defined, Visual Basic will generate an external PDB file. Else, the compiler will include the debug information in the executable. For more information on this, see Visual Basic documentation.

    To compile your Visual Basic application ... follow these steps:

    1. If you compile a release version of your product, make certain that the Link environment variable is not defined. If this environment variable exists, Visual Basic will embed debug information in the executable and thus the overall size of your application will increase.
    2. Open your project in Microsoft Visual Basic.
    3. Select Project | Project Properties from Visual Basic’s main menu. This will open the Project Properties dialog.
    4. Move to the Compile tabbed page and select the Create Symbolic Debug Info check box:

    enter image description here

    1. Press OK to close the dialog.
    2. Recompile your application.

    There is no need to ship the generated PDB files along with your application.