4

I want to step into the DevExpress XAF code using the debugger.

I have asked about it here but am having problems spotting what I have done wrong.

VS2019 16.2.2 Dev Express XAF 19.1.5 Winforms project The break point is in Program.cs at

winApplication.Start

which is in

DevExpress.ExpressApp.Win.WinApplication

I downloaded the .pdb files and set up the Symbols Symbols set up

I un-checked Tools->Options->Debugging->Enable Just My Code

At the breakpoint Debug->Windows->Modules shows that the Symbol file for mscorlib.dll is loaded.

mscorelib

Exception settings are

Exception settings

[Update]

Lance Li pointed out the cannot find or open the pdb file message cannot find or open the pdb file

When I select Symbol Load Information it mentions the location is

C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\DevExpress.Utils.v19.1\v4.0_19.1.5.0__b88d1754d700e49a\DevExpress.Utils.v19.1.pdb: Cannot find or open the PDB file.

I tried clicking the load all symbols button in the symbols screen but it did not help.

I attempted to locate the pdb but got a message

A matching symbol file was not found in this folder

matching symbol file not found

I tried suspending Resharper and that did not help.

[Update]

I noticed that it is looking for the file in the GAC

In the GAC

I see that there is a copy of mscorlib.pdb in d:\pdb\19.1 Could it be that that somehow re-arranges something to expect to find the Dev Express .pdbs in the GAC?

The source code is on GitHub

[Update]

In the DevExpress question Dennis points out that when he hits F11 Visual Studio asks for a source code path. I think this happened once for me I have selected the default path. Now Visual Studio no longer asks.

I tried re-cloning the application but it did not help. I tried opening up with VS2017 but that did not help.

[Update]

I installed on to a different computer then at the break point I received a dialog box to select the source code.

I located the source at

Directory of C:\Program Files (x86)\DevExpress 19.1\Components\Sources\DevExpress.ExpressApp\DevExpress.ExpressApp\DevExpress.Persistent.Base

Then I was able to step through the Dev Express code on the second computer.

Now to figure out how to correct the behaviour on the first computer.

[Update] I was able to get the Find Source dialog up by the following method. Run to the break point , then select Debug -> Windows -> Modules. Then right click an unloaded module and un-check Always Load Automatically.

After that when I ran again I got the dialog allowing me to locate the source.

Kirsten
  • 15,730
  • 41
  • 179
  • 318
  • Hi, what assembly does this `winApplication.Start` method comes from? mscorlib.dll is not from third-party code, so I think whether it is loaded won't affect your debugging third-party code. You can uncheck the `Require source files to exactly match the original version` option to check if it helps. – LoLance Sep 09 '19 at 07:02
  • @LanceLi-MSFT Thanks I added the code is in DevExpress.ExpressApp.Win.WinApplication I have Require source files to exactly match the original version unchecked. – Kirsten Sep 09 '19 at 08:28
  • 1
    According to the 2nd pic about moudles window, the Symbol Status about DevExpress.xx assemblies is `cannot find or open ...`, same with DevExpress.ExpressApp assembly? It seems that debugger can't find the related symbol files in folder 19.1. – LoLance Sep 09 '19 at 08:39
  • Do note how confusing it can be to make the pdb source directory the same as the cache directory. The dialog clearly shows that you put the PDB files in a directory other than d:\pdb\19.1. But you'll have to get past the version mismatch to make real headway, there were 3 releases of 19.1 this year. You got the pdbs for 19.1.5, released on August 1st. But there were also 19.1.3 (May 16th) and 19.1.4 (June 20th). Use the company's [product identification page](https://www.devexpress.com/Support/Versions.xml) to find out what you actually got. – Hans Passant Sep 10 '19 at 12:32
  • I updated the question to show that I am using 19.1.5 in the references. The pdb files are dated 1-Aug-19 so I expect they are 19.1.5 too – Kirsten Sep 10 '19 at 13:08
  • 1
    @KirstenGreed, is it possible for you to share your code (minimal) for us to try and replicate the issue? – dj079 Sep 10 '19 at 22:23
  • Thanks I updated the question with a GitHub link – Kirsten Sep 11 '19 at 00:22
  • 1
    Hi, I see your newest edit, to correct the behavior, you should go Solution=>Properties=>Common Properties=>to correct the settings. You can configure the `Directories containing source code` and `Do not look for these source files settings`(this is what you want I guess) there. – LoLance Sep 12 '19 at 03:12
  • @LanceLi-MSFT This is correct. Care to write it up? I discovered that once I unchecked the Always Load Automatically, then when I did locate the source , the solution's Debug Source Files property was updated. – Kirsten Sep 12 '19 at 03:27
  • @KirstenGreed Since your question contains many aspects, and I only help to solve part of them, I recommend you can write an answer with details in all your update then mark it, and that'll be more helpful for those with similar issues! – LoLance Sep 12 '19 at 03:46
  • Ok, thanks for your help @LanceLi-MSFT – Kirsten Sep 12 '19 at 03:48

1 Answers1

2

My problem was that Visual Studio was looking in the wrong place for the source. Further to that, because it had been told to look in the wrong place automatically then I did not receive a dialog asking me to locate the source.

So as to receive the Find Source Dialog , the trick was to unckeck the Always Load Automatically option.

To get at this option, I ran to the break point and then selected Debug -> Windows -> Modules. Then right clicked an unloaded module and un-checked Always Load Automatically.

A different way could have been to add the correct path to the Solution->Properties->Common Properties-> Directories Containing Source Code

Kirsten
  • 15,730
  • 41
  • 179
  • 318