question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

debugType "full" does not work on OS X

See original GitHub issue

Steps to reproduce

  1. On OS X, check out this GitHub project at this commit
  2. Run this command: dotnet restore
  3. Run this command: dotnet test ./test/CoreMatchers.Tests/project.json

Expected behavior

Compilation should succeed.

Actual behavior

[master]bherman-mbp:~/development/side_projects/CoreMatchers
$ dotnet restore
log  : Restoring packages for /Users/bherman/development/side_projects/CoreMatchers/src/CoreMatchers/project.json...
log  : Restoring packages for /Users/bherman/development/side_projects/CoreMatchers/test/CoreMatchers.Tests/project.json...
log  : Lock file has not changed. Skipping lock file write. Path: /Users/bherman/development/side_projects/CoreMatchers/src/CoreMatchers/project.lock.json
log  : /Users/bherman/development/side_projects/CoreMatchers/src/CoreMatchers/project.json
log  : Restore completed in 314ms.
log  : Writing lock file to disk. Path: /Users/bherman/development/side_projects/CoreMatchers/test/CoreMatchers.Tests/project.lock.json
log  : /Users/bherman/development/side_projects/CoreMatchers/test/CoreMatchers.Tests/project.json
log  : Restore completed in 508ms.
[master]bherman-mbp:~/development/side_projects/CoreMatchers
$ dotnet test ./test/CoreMatchers.Tests/project.json
Project CoreMatchers (.NETStandard,Version=v1.6) will be compiled because Input items removed from last build
Compiling CoreMatchers for .NETStandard,Version=v1.6
/usr/local/share/dotnet/dotnet compile-csc @/Users/bherman/development/side_projects/CoreMatchers/src/CoreMatchers/obj/Debug/netstandard1.6/dotnet-compile.rsp returned Exit Code 1
/Users/bherman/development/side_projects/CoreMatchers/src/CoreMatchers/error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.amd64.dll'

Compilation failed.
    0 Warning(s)
    1 Error(s)

Time elapsed 00:00:00.9106075

SUMMARY: Total: 1 targets, Passed: 0, Failed: 1.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-1-003177)

Product Information:
 Version:            1.0.0-preview2-1-003177
 Commit SHA-1 hash:  a2df9c2576

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64

Notes

The issue is the here where it says, "debugType": "full",. Changing this line to "debugType": "portable", allows the compilation to succeed.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TheRealPiotrPcommented, Nov 28, 2016

We should consider adding a persistent warning if debugType is not portable, off only if the project targets Desktop TFMs only.

0reactions
jpopadakcommented, Nov 24, 2016

Honestly, I don’t care what the error message states. As long at it explains that the debutType of full is not supported for non-windows machines. It would have saved my friend hours of searching the web…

@TimeDelta works strictly on Mac OS, I have someone else who works strictly on Linux, and I work strictly on Windows. They both had the same issue except for me. I thought their CLI tools were broken.

Once I realized that it was attempting to write out the PDB file, I told them to switch up the debugType and it all started working again.

The error message of CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.amd64.dll' simply isn’t detailed enough to explain to first time users of .NET / .NET Core when coming from a Java background.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error CS1902: Invalid option 'portable' for /debug; must be ...
I'm current using csc 2.6.0.62309 on the mac (via mono 5.10. · I believe the issue is, the original development of 'starter' files...
Read more >
CA0068 when DebugType set to "portable"
NET Framework 4.5 project to use DebugType "portable". This is supported in the project Debug settings and I am able to step through...
Read more >
C# Compiler Options that control code generation
The DebugType option causes the compiler to generate debugging information and place it in the output file or files. Debugging information is ......
Read more >
Making Rhino Plugin load on Mac - McNeel Forum
Hello everyone, I would like to have our plugin load (and work) on Mac as well. I followed the instructions on Your First...
Read more >
I just created a new MonoGame project in Xamarin and it ...
Hello, I tried to create a new solution and just after that run the project, but it does throw an error to me...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found