Skip to content
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

Processed debug symbols aren't copied to the publish directory #1331

Closed
rolfbjarne opened this issue Jul 9, 2020 · 3 comments
Closed

Processed debug symbols aren't copied to the publish directory #1331

rolfbjarne opened this issue Jul 9, 2020 · 3 comments

Comments

@rolfbjarne
Copy link
Member

Repro:

consoleapp-10efc6c.zip

Download, extract and run make linked to run the linked sample, and make notlinked to run the non-linked sample.

Expected result: a stack trace with file name and line number information should be shown.

$ make notlinked
/usr/local/share/dotnet/sdk/5.0.100-preview.7.20317.11/MSBuild.dll -nologo -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/local/share/dotnet/sdk/5.0.100-preview.7.20317.11/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/local/share/dotnet/sdk/5.0.100-preview.7.20317.11/dotnet.dll -maxcpucount -property:RuntimeIdentifier=osx-x64 -property:SelfContained=true -p:MonoAOT=true -p:VM=mono -p:PublishTrimmed=false -restore -target:Publish -verbosity:m /v:quiet /bl:consoleapp-notlinked.binlog ./myproject.csproj
** Executing app as-is
bin/Debug/netcoreapp5.0/osx-x64/publish/myproject
   at System.Environment.get_StackTrace()
   at App.Main() in /Users/rolf/test/dotnet/consoleapp/Program.cs:line 7

$ make linked
/usr/local/share/dotnet/sdk/5.0.100-preview.7.20317.11/MSBuild.dll -nologo -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/local/share/dotnet/sdk/5.0.100-preview.7.20317.11/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/local/share/dotnet/sdk/5.0.100-preview.7.20317.11/dotnet.dll -maxcpucount -property:RuntimeIdentifier=osx-x64 -property:SelfContained=true -p:MonoAOT=true -p:VM=mono -p:PublishTrimmed=true -p:_ExtraTrimmerArgs=-b -restore -target:Publish -verbosity:m /v:quiet /bl:consoleapp-linked.binlog ./myproject.csproj
** Executing app as-is
bin/Debug/netcoreapp5.0/osx-x64/publish/myproject
   at System.Environment.get_StackTrace()
   at App.Main()
** Copying in the linked pdb
cp ./obj/Debug/netcoreapp5.0/osx-x64/linked/myproject.pdb ./bin/Debug/netcoreapp5.0/osx-x64/publish
bin/Debug/netcoreapp5.0/osx-x64/publish/myproject
   at System.Environment.get_StackTrace()
   at App.Main() in /Users/rolf/test/dotnet/consoleapp/Program.cs:line 7

The non-linked sample works (shows Program.cs:7), but the linked sample only works after copying the linked pdb into the publish directory.

@marek-safar
Copy link
Contributor

@sbomer is this something what was fixed in the debugger SDK changes?

@sbomer
Copy link
Member

sbomer commented Jul 9, 2020

Yes, this should be fixed with dotnet/sdk#12144. The latest bits from dotnet/installer have the change - would you mind giving it a try @rolfbjarne?

@rolfbjarne
Copy link
Member Author

would you mind giving it a try @rolfbjarne?

Correct, this seems to be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants