-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug / trace find ancestor of type #10312
Comments
@mjkkirschner You can download the symbols and do not decompiling symbols in visual studio. And you can build the wpf repo to get the debug dll and pdb file. And you can replace it with your build version. |
@mjkkirschner does the solution provided by @lindexi answer your question? |
You could also try adding a breakpoint by function name. |
thanks for the suggestions, I was looking at https://github.com/dotnet/wpf/blob/main/Documentation/developer-guide.md The guide says to install a test host and to replace the binaries for that test host? Apologies for my ignorance there - is this also the appropriate workflow if I just want to debug? Looking for a tad more guidance on debugging - I am totally happy to follow @lindexi's suggestion of |
@mjkkirschner You can just reference the built debug libraries directly in the project, e.g. <Reference Include="%HOMEDRIVE%\Users\somebody\wpf\artifacts\bin\PresentationCore\x64\Debug\net10.0\PresentationCore.dll">
<Private>True</Private>
</Reference>
<Reference Include="%HOMEDRIVE%\Users\somebody\wpf\artifacts\bin\PresentationFramework\x64\Debug\net10.0\PresentationFramework.dll">
<Private>True</Private>
</Reference>
<Reference Include="%HOMEDRIVE%\Users\somebody\wpf\artifacts\bin\WindowsBase\x64\Debug\net10.0\WindowsBase.dll">
<Private>True</Private>
</Reference> Do note that debugging on And in order to debug .NET 10 in VS, you will need the preview for Visual Studio and to set this env variable: In case you're not running under a specific host and you wish to replace libraries for framework-dependent apps, you can just do it directly in the runtime folder, e.g. for Windows Desktop libraries:
|
thank you for all the suggestions, I will close this for now and reopen if I have trouble. Thanks! |
Actually, I've tried a few suggestions here and while they worked with a new wpf app - they did not work with my real application. After reading about default probing paths and tracing the assembly loads it appears that because my application does not have a deps.json file generated (we have not gotten this working yet, it's a legacy application ported to net8) that It seems my only options are to:
Am I missing some other option? |
Hello,
please redirect me if this is the not the correct location for this issue.
I would somehow like to debug all FindAncestorOfType calls but I cannot seem to find objectref file when decompiling symbols in visual studio.
If that is not possible I would like to enable the tracing args for this method - is that possible?
wpf/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Data/ObjectRef.cs
Line 393 in b08d70d
The text was updated successfully, but these errors were encountered: