-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support Single File Diagnostics #45382
Comments
Tagging subscribers to this area: @tommcdon Issue DetailsThis issue is tracking the work necessary to support single-file diagnostics [ ] dbgshim needs an ELF parser to identify if a module is CoreCLR + extract the DAC/DBI keys. [ ] dbgshim OVP needs updated ILibraryProvider callback interface that accepts buildid information for DAC/DBI. This receives the DAC/DBI keys that were retrieved in (4) David [ ] dbgshim live debugging case needs to integrate ILibraryProvider so that the caller can locate DAC/DBI instead of dbgshim F:\github\coreclr\src\pal\src\thread\process.cpp:1809 - InvokeStartupCallback - This searches for coreclr in the module list in order to:
[ ] CreateDump + DAC (or a fraction of it) needs to be linked into the nativehost [ ] Linked in CreateDump is modified to use a linked in DAC rather than searching for it
|
Is there any updates here on progress? This is also affecting attaching to .NET 5 & 6 apps in an MSIX that aren't single file. |
The work for dbgshim needed for msix is planned but not yet fully designed. Other more time sensitive components of single file diagnostics were getting addressed first. Cc @tommcdon |
This one is required so we can e.g. attach a debugger to installed MSIX app. My team has just migrated the app from .NET framework, where it worked, to .NET 5.0 and it turns out that we won't be able to debug it until .NET 7.0? Feels like a big gap to me. |
debugging in single file mode worked for in .Net 5 and not working in .net 6 , is it only going to be fixed in .net 7? |
@yoziv By debugging you mean using a debugger like VS? I'm sorry this might be causing some issues in your experience... Right now single file is only debuggable through SOS. Single files are a deployment mechanism and they changed quite a bit in .NET 6. There wasn't enough time in .NET 6 to add support to launching/attach to one them. For the inner dev loop, debugging would need to go through the usual app build, and SOS is available for the cases where that doesn't work - like post mortem diagnostics. |
@hoyosjs right now you can't even F5 debug a project with single file publish enabled when it is targeting .NET 6 in VS2022. That may be different from what this issue is tracking. Is this issue specifically the ability to attach a debugger to the published application? This feedback is specifically for "press play" debug in .NET 6/VS2022 which does not work. |
Currently I bypass this by making |
Sorry - from a scenario perspective this is indeed a regression. I wasn't aware that VS does a use of the publish output to running inner loop scenarios, I expected only build to happen. To achieve this behavior - as @AraHaan says - the best solution is to have this on the project file: <PublishSingleFile Condition="'$(Configuration)' == 'Release'">true</PublishSingleFile> The only scenario that this will still fail to cover is doing attach to a running application build outside of the IDE (basically, a release mode attach). |
Tnx @hoyosjs The workaround works. |
I closing this now. I created #68676 to track the last item. |
@mikem8361 Many thanks for this! |
This issue is tracking the work necessary to support single-file diagnostics. Our goal is to deliver parity with debugging and profiling with framework dependent applications where applicable.
dbgshim
needs an ELF parser to identify if a module is CoreCLR + extract the DAC/DBI keys. There's currently a copy in use in the runtime forcreatedump
and the DAC on Linux dumps and one used in SOS forOpenVirtualProcess
.dbgshim
OVP needs updatedILibraryProvider
callback interface that accepts buildid information for DAC/DBI. This receives the DAC/DBI keys that were retrieved.dbgshim
live debugging case needs to integrateILibraryProvider
so that the caller can locate DAC/DBI instead ofdbgshim
.runtime/src/coreclr/src/pal/src/thread/process.cpp
Line 1654 in 6438d08
createdump
and a portion of the DAC need to be linked into the hostcreatedump
needs to be modified to use a linked in DAC rather than searching for it.The text was updated successfully, but these errors were encountered: