runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Getting Cannot find or open the symbol file for dotnetcore using vscode

Open iangregsondev opened this issue 10 years ago • 24 comments

Hi,

Getting the following errors,launching a debug session from vs code, it seems to work but why so many errors ?

Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Private.CoreLib.ni.dll'. Cannot find or open the symbol file.
Loaded '/Users/ian/Downloads/testdotnet/bin/Debug/netcoreapp1.0/testdotnet.dll'. Symbols loaded.
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Runtime.dll'. Cannot find or open the symbol file.
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/mscorlib.dll'. Cannot find or open the symbol file.
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Console.dll'. Cannot find or open the symbol file.

Anyone help ?

iangregsondev avatar Oct 08 '16 19:10 iangregsondev

Also seeing this issue but it does not prevent the application from compiling.

egeexyz avatar Oct 12 '16 20:10 egeexyz

Same here, on mac os

fyodoriv avatar Oct 16 '16 11:10 fyodoriv

Failure to find symbols is not an error and does not prevent the application from running correctly. In the worst case you won't be able to debug into those libraries but debugging your own code should work fine (since symbols for testdotnet.dll have been loaded).

mikedn avatar Oct 16 '16 11:10 mikedn

@mikedn that's true, but I don't like having warnings during the compilation. Is there any way to fix them?

fyodoriv avatar Oct 17 '16 09:10 fyodoriv

but I don't like having warnings during the compilation

But those aren't compilation warnings, those are informational messages generated by the debugger when it starts.

mikedn avatar Oct 17 '16 10:10 mikedn

'/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Runtime.dll'. Cannot find or open the symbol file.

This sounds like it'd be a major issue. But like I said, it doesn't effect compilation for me. What exactly is the warning telling us?

egeexyz avatar Oct 17 '16 17:10 egeexyz

The debugger tells you that it wasn't able to find the debug symbol file associated with System.Runtime.dll. That will prevent you from stepping into System.Runtime code. It shouldn't prevent you from stepping through your own code and it certainly doesn't affect the normal application execution.

mikedn avatar Oct 17 '16 18:10 mikedn

Sounds like it is related to this one https://github.com/dotnet/cli/issues/3421

kuncevic avatar Oct 18 '16 00:10 kuncevic

Not able to run using VS code, getting tons of Cannot find or open the symbol file. My project.json has "buildOptions": { "debugType": "portable", ...

ghost avatar Nov 07 '16 00:11 ghost

Yes, those are just informational messages from debugger stating that we will not be able to step into dot net core libraries. This behavior is just fine because usually we don't have to debug .net libraries. But is there any way to disable these messages? Because there are quite a few of them and they are very annoying.

andrius-k avatar Jan 02 '17 20:01 andrius-k

I have made a test for both C# and F#. C# debugging works for my code as expected. The problem is with F#, it won't load symbols even my pdb file is present. I have even tried specifying "symbolPath" in launch.json but no effect.

A repo with the example is here https://github.com/draganjovanovic1/vs-code-debug-test

C#

Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/System.Private.CoreLib.ni.dll'. Cannot find or open the symbol file. Loaded '/Users/dragan/Projects/vs-code-debug-test/src/C-sharp-test/bin/Debug/netcoreapp1.1/C-sharp-test.dll'. Symbols loaded. Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/System.Runtime.dll'. Cannot find or open the symbol file. Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/mscorlib.dll'. Cannot find or open the symbol file. Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/System.Console.dll'. Cannot find or open the symbol file.

F#

Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/System.Private.CoreLib.ni.dll'. Cannot find or open the symbol file. Loaded '/Users/dragan/Projects/vs-code-debug-test/src/F-sharp-test/bin/Debug/netcoreapp1.1/F-sharp-test.dll'. Cannot find or open the symbol file. Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/System.Runtime.dll'. Cannot find or open the symbol file. Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/mscorlib.dll'. Cannot find or open the symbol file. ...

draganjovanovic1 avatar Jan 06 '17 09:01 draganjovanovic1

Any update on this? How do we suppress these messages or allow it to find the dll?

mohamedmansour avatar Feb 04 '17 02:02 mohamedmansour

Getting used to them isn't appropriate as seeing this many warnings does 2 things:

  1. it breeds apathy towards warnings
  2. it hides other more consequential messages.

Adam-Pond avatar Feb 21 '17 04:02 Adam-Pond

CC @noahfalk

gkhanna79 avatar Mar 06 '17 03:03 gkhanna79

@gregg-miskelly

noahfalk avatar Mar 06 '17 23:03 noahfalk

This is a duplicate of https://github.com/OmniSharp/omnisharp-vscode/issues/837. Note that for the upcoming 1.8 release we changed the message. Hopefully with the new message it will be more clear that it is a 'status' message rather than a warning.

gregg-miskelly avatar Mar 07 '17 00:03 gregg-miskelly

@gregg-miskelly Is there a way of disabling this 'status' message completely? A project ignore list perhaps?

As mentioned, seeing a swath of irrelevant messages that don't affect the user and can't be avoided isn't a great option as it breeds apathy and complacency, not to mention hides more significant messages in the noise.

Adam-Pond avatar Mar 07 '17 00:03 Adam-Pond

@Adam-Pond you can disable all module messages if you like (see logging options in launch.json). I don't necessarily recommend that since VS Code has no modules window, so if the debugger doesn't load symbols for a module you want it to, you will not have the ability to find out. But you certainly can if you want.

gregg-miskelly avatar Mar 07 '17 00:03 gregg-miskelly

@gregg-miskelly Greg, I think you just made the case for why this issue can't be marked as closed. There are so many way to address this (allow hiding these specific messages only, have a tree of messages for related messages similar to conversation viewing in emails), but just changing the message doesn't resolve the issues. As @draganjovanovic1 pointed out, there are some messages that you want to stand out. Not having to scroll through pages of logs to find them will avoid many issues.

Adam-Pond avatar Mar 07 '17 01:03 Adam-Pond

@Adam-Pond you are welcome to open a new issue in the omnisharp-vscode repo, or the VS Code repo if you are proposing a UI solution. It is not a coreclr issue, so this is not the right spot for this issue. Personally, I don't think there is a way to really solve this problem until VS Code has a modules window. But if you have suggestions on what you want to see we can consider it. I see where you are coming from, but I also don't know of anything that can really be done to improve things -- sometimes you need to know what is loaded, or need to know why symbols were or were not loaded, and sometimes you don't. One person's spam is another person's crucial events.

gregg-miskelly avatar Mar 07 '17 04:03 gregg-miskelly