Khắc phục lỗi cannot find or open the pdb file năm 2024

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.

hi. I followed this tutorial and noticed that even when i use the includes as recommended, i didnt get the informations about leaks in the ouptput window. ( i made sure that the order of the includes are correct and i included the function call "_CrtDumpMemoryLeaks(); " and my app does ot have mulltiple exits.

the first issue was that i the outputwindow returned several "warnings" like: "'C:\WINDOWS\system32\ntdll.dll', Cannot find or open the PDB file"

i fixed this issue by following this stack overflow post " https://stackoverflow.com/questions/12954821/cannot-find-or-open-the-pdb-file-in-visual-studio-c-2010 " i marked the checkbox "Microsoft Symbol Servers" in Tools->Options->Debugging->Symbol

now i get the leak information in the output window, but i dont get the filename and line number where the leaked memory is first allocated. the tutorial tells that this is caused when "_CRTDBG_MAP_ALLOC" is not defined. i made shure that is is defined.

using visual studio 2017 15.9.5

i hope that there is a scolution for this problem. i appreciate any help and feedback sincerely


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: b6261e48-d28d-38ce-a32c-3394c1122f32
  • Version Independent ID: 2b115f45-6220-cdc3-b99e-49c8dae885a0
  • Content:
  • Content Source: docs/debugger/finding-memory-leaks-using-the-crt-library.md
  • Product: visual-studio-dev15
  • GitHub Login: @Mikejo5000
  • Microsoft Alias: mikejo

'AstroCompanion.exe' (CLR v4.0.30319: AstroCompanion.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibili ty.dll'. Cannot find or open the PDB file.

It does not seem to affect the running, or functionality, of the code. What am I missing here?

I can fix what stupid does, but, I cannot fix stupid

  • Jan 21st, 2018, 04:12 AM

    Re: Cannot find or open the PDB file That file may have failed to copy for some reason during installation, although I'm not sure whether that should be part of your Windows installation or a separate .NET Framework installation. It might not be a bad idea to try to repair that .NET installation either way. Either that or try just copying that file from another machine if you can.

    -
  • Jan 21st, 2018, 04:26 AM

    Khắc phục lỗi cannot find or open the pdb file năm 2024
    Thread Starter Addicted Member
    Khắc phục lỗi cannot find or open the pdb file năm 2024

    -

    Re: Cannot find or open the PDB file

    Khắc phục lỗi cannot find or open the pdb file năm 2024
    Originally Posted by jmcilhinney

That file may have failed to copy for some reason during installation, although I'm not sure whether that should be part of your Windows installation or a separate .NET Framework installation. It might not be a bad idea to try to repair that .NET installation either way. Either that or try just copying that file from another machine if you can.

Thanks. I have 2 other machine with VS2017. Will give it a go. I can fix what stupid does, but, I cannot fix stupid

-
  • Jan 22nd, 2018, 09:49 AM

    Khắc phục lỗi cannot find or open the pdb file năm 2024
    Thread Starter Addicted Member
    Khắc phục lỗi cannot find or open the pdb file năm 2024

    -

    Re: Cannot find or open the PDB file

    Ok. I did a bit of digging on the web. After a while I came upon these suggestions:

Tools > Options > Debugging > Native and check Load DLL Exports Did not work for me.

Tools-> Options-> Debugging-> Symbols. Select checkbox "Microsoft Symbol Servers". Visual Studio will download PDBs automatically. Works. But Visual Studio connects to the Microsoft Servers. A definite no-no for the company that I am contracting to. No internet access allowed from control system computers.

Tools -> Options -> Debugging -> Output Window -> Module Load Messages -> Off Removes these messages, see below:

'NamdebConfigurationTool.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'd:\documents\visual studio 2017\Projects\NamdebConfigurationTool\NamdebConfigurationTool\bin\Debug\NamdebConfigurationTool.exe' . Symbols loaded. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Mi crosoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.d ll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\Syst em.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Dra wing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\Syst em.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll '. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\S ystem.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll '. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934 e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Nu merics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibili ty.dll'. Symbols loaded. 'AstroCompanion.exe' (CLR v4.0.30319: AstroCompanion.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibili ty.dll'. Cannot find or open the PDB file.

Question is the fact that the PDB file is missing, a problem? I can fix what stupid does, but, I cannot fix stupid

-
  • Jan 22nd, 2018, 12:14 PM

    Re: Cannot find or open the PDB file

    Khắc phục lỗi cannot find or open the pdb file năm 2024
    Originally Posted by Slabs1960

Ok. I did a bit of digging on the web. After a while I came upon these suggestions:

Tools > Options > Debugging > Native and check Load DLL Exports Did not work for me.

Tools-> Options-> Debugging-> Symbols. Select checkbox "Microsoft Symbol Servers". Visual Studio will download PDBs automatically. Works. But Visual Studio connects to the Microsoft Servers. A definite no-no for the company that I am contracting to. No internet access allowed from control system computers.

Tools -> Options -> Debugging -> Output Window -> Module Load Messages -> Off Removes these messages, see below:

Question is the fact that the PDB file is missing, a problem?

I believe that is a file used for debugging purposes. It depends on you if it is used in your programming. I use it to capture line numbers in error handling. Please remember next time...elections matter!

- Jan 22nd, 2018, 12:18 PM

Khắc phục lỗi cannot find or open the pdb file năm 2024
Thread Starter Addicted Member
Khắc phục lỗi cannot find or open the pdb file năm 2024

-

Re: Cannot find or open the PDB file

I do not use it, currently. So, I will ignore it for now and worry about it later if I need it.

Thanks I can fix what stupid does, but, I cannot fix stupid

-
Jan 22nd, 2018, 08:27 PM

Re: [RESOLVED] Cannot find or open the PDB file

A PDB file is a project database file. It contains information that maps your compiled assembly back to your project source code. I'm not sure of all the information it contains but, when an exception is thrown in your EXE and the stack trace includes the line number from the original source code, that's coming from the PDB file. That means that, without it, you may not get as much information in exceptions but I doubt you care that much if it's a system DLL anyway.

-
  • Jan 23rd, 2018, 09:36 AM

    Khắc phục lỗi cannot find or open the pdb file năm 2024
    Thread Starter Addicted Member
    Khắc phục lỗi cannot find or open the pdb file năm 2024

    -

    Re: [RESOLVED] Cannot find or open the PDB file

    After playing with this I found that after setting this Tools-> Options-> Debugging-> Symbols. Select checkbox "Microsoft Symbol Servers". Visual Studio will download PDBs automatically., and running the project. The error obviously disappeared. After turning it off the error was still not there. Problem resolved. Project no longer looked for Microsoft servers. I now get: 'NamdebConfigurationTool.exe' (CLR v4.0.30319: NamdebConfigurationTool.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibili ty.dll'. Symbols loaded.