fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Debugging runtime libraries

Debugging runtime libraries 21 May 2020 10:50 #14659

  • Serggio's Avatar

  • Serggio

  • Topic Author


  • Posts: 24
  • What is the correct (and simpliest :) ) way to debug the X# Runtime libraries? There are debug-versions of DLLs in XSharp\Debug folder, but how do I use them instead of release builds, so that Visual Studio debugger could see those pdb-files?

    Please Log in or Create an account to join the conversation.

    Last edit: by Serggio.

    Debugging runtime libraries 21 May 2020 11:22 #14662

  • Chris's Avatar

  • Chris


  • Posts: 1873
  • Hi Serggio,

    The _simplest_ way, is to just copy those files (together with the .pdb ones) from the debug folder to their respective folders in the GAC, at C:\Windows\Microsoft.NET\assembly\GAC_MSIL\.XSharp.*, replacing the old ones.

    Robert may also tell you the "official" way :)
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Debugging runtime libraries 21 May 2020 11:34 #14663

  • robert's Avatar

  • robert


  • Posts: 1676
  • Chris, Sergio,

    To add debugging for assemblies in the GAC you point VS to the location for the PDBs:
    - Debug Options - Symbols (in the tree) - Click [+] and add the location c:\Program Files (x86)\XSharp\Redist\
    - Debug Options -General - Untick the checkbox "Require Source files to exactly match etc."
    - Download the runtime source from Github: github.com/X-Sharp/XSharpPublic/tree/v2410 (this is the tag that matches release 2.4a)
    - Copy that source to C:\Xsharp\DevRt

    This gives you limited debugging, since the compiler has optimized the code. For full debugging you need to use the DLLs and PDB files from c:\Program Files (x86)\XSharp\Debug\ and remove the DLLs from the GAC.
    I have attached 2 batch files that I use to add / remove the DLLs from the GAC. Run these as administrator
    If you remove the files from the GAC then make sure you copy all needed DLLs (including the RDD and Macrocompiler) to your programs output folder with their PDBs.
    I have also added a batch file that I use to copy all the Debug versions of the DLLs (from the output folder inside C:\Xsharp\DevRt) into the GAC.

    Robert
    XSharp Development Team
    The Netherlands
    Attachments:

    Please Log in or Create an account to join the conversation.

    Last edit: by robert.

    Debugging runtime libraries 21 May 2020 12:51 #14664

  • Serggio's Avatar

  • Serggio

  • Topic Author


  • Posts: 24
  • Thank you, Robert and Chris, for such a detailed answer!

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1