Reputation: 31
In MS Dynamics 365 for Operations (AX7), I'm trying to debug a form method. I can set breakpoints. I can start debugging and it stops at breakpoint as it should. But then, when I click F11, an error is shown:
"Source not found"
There is no such file with .xpp extension found, so debugging is not working.
How to find required .xpp source file? How to solve this issue? Or is there a workaround?
Upvotes: 3
Views: 2657
Reputation: 1013
I was able to solve this issue in my environment by creating a solution and project and having the project in my extension model. I did not have to add the code I was debugging to the project.
Upvotes: 0
Reputation: 1090
Make sure that you do not have the setting checked to load only symbols in your solution.
To turn off this setting, go to Tools -> Options -> Find the "Dynamics 365" node and expand it -> Debugging -> Uncheck "Load symbols only for itmes in the solution"
I have run into this occasionally during development even after unchecking this box, and I usually have to reboot my dev VM for it to figure itself out. I think there are some other reasons it can't find the symbols but I haven't investigated further. Also, this will impact performance; the increased amount of symbols loaded will slow the start of the debugger.
Edit I ran into this again even with the box unchecked. One way I got around it (even though this is a workaround, not a real fix) is to open the methods that it is looking for and restarting debugging. If the method/class/form whatever code is loaded in the Visual Studio editor, it will "find" it. Not a pretty solution, but at least you can step through the code...
Edit 2 As per Vadim's comment: "it's not necessary to restart debugging. When the code has been loaded in the Visual Studio the way you described, just click the previous line in the call stack to jump to the place where the missing file was called from. After that click the last line of the stack and you will come to the current statement."
Upvotes: 3