Debugging runtime libraries
Debugging runtime libraries
What is the correct (and simpliest ) way to debug the X# Runtime libraries? There are debug-versions of DLLs in XSharpDebug folder, but how do I use them instead of release builds, so that Visual Studio debugger could see those pdb-files?
Debugging runtime libraries
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:WindowsMicrosoft.NETassemblyGAC_MSIL.XSharp.*, replacing the old ones.
Robert may also tell you the "official" way
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:WindowsMicrosoft.NETassemblyGAC_MSIL.XSharp.*, replacing the old ones.
Robert may also tell you the "official" way
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Debugging runtime libraries
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)XSharpRedist
- Debug Options -General - Untick the checkbox "Require Source files to exactly match etc."
- Download the runtime source from Github: https://github.com/X-Sharp/XSharpPublic/tree/v2410 (this is the tag that matches release 2.4a)
- Copy that source to C:XsharpDevRt
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)XSharpDebug 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:XsharpDevRt) into the GAC.
Robert
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)XSharpRedist
- Debug Options -General - Untick the checkbox "Require Source files to exactly match etc."
- Download the runtime source from Github: https://github.com/X-Sharp/XSharpPublic/tree/v2410 (this is the tag that matches release 2.4a)
- Copy that source to C:XsharpDevRt
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)XSharpDebug 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:XsharpDevRt) into the GAC.
Robert
- Attachments
-
- batchfiles.zip
- (1 KiB) Downloaded 50 times
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Debugging runtime libraries
Thank you, Robert and Chris, for such a detailed answer!