Loading unnecessary directX files? - visual-studio-2010

When I run my application I get different output compare to my colleague's.
The different part is Loading DirectX & Unloading them again part.
Loaded 'C:\Windows\SysWOW64\dxgi.dll', Cannot find or open the PDB file.
Loaded 'C:\Windows\SysWOW64\d3d10.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\d3d10core.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\d3d10_1.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\d3d10_1core.dll', Cannot find or open the PDB file
Loaded 'C:\Windows\SysWOW64\d3d11.dll', Cannot find or open the PDB file
Unloaded 'C:\Windows\SysWOW64\ddraw.dll'
Unloaded 'C:\Windows\SysWOW64\dciman32.dll'
Unloaded 'C:\Windows\SysWOW64\dxdiagn.dll'
Unloaded 'C:\Windows\SysWOW64\d3d11.dll'
Unloaded 'C:\Windows\SysWOW64\d3d10_1.dll'
Unloaded 'C:\Windows\SysWOW64\d3d10_1core.dll'
Unloaded 'C:\Windows\SysWOW64\d3d10.dll'
Unloaded 'C:\Windows\SysWOW64\d3d10core.dll'
Above is the difference( just part of it ).
** Q1: Why load all directX related dll files and unload them again?
** Q2: They're not even loaded in my colleague's system. And runs good(even faster). What causes to load them and how can I make it not to load?
And I'm using Windows 7 64-bit, VisualStudio 2010, DirectX.

Well the reason why it is Unloading is because it can't find the pdb debug file that is required for debugging. You could recreate those or just compile the pdb files.
As to why they are loading, something in your project has a reference to DirectX. What app are you building? Some newer frameworks have DirectX/Direct3D in them like WPF, XNA etc.
As to why your collegue doesn't see it... Are you both building debug builds? (you won't see the psdb stuff on release mode). Do you have extra projects in your solution or the same solution? The pdb errors happen alot. If you just figure out what is using DirectX or generate the pdbs or build in Release those messages will go away.

Related

How to find the pdb or dll location for symbols you have already loaded?

If I am debugging something in Visual Studio, and I am looking through the call stack, and some code in the stack is external code, and I click to Load Symbols for that code, and the symbols load, and I can now browse through the source code... where on my file system is the pdb that those symbols were loaded from?
Regardless of which symbol server those symbols are loaded from, as far as I am aware, there has to be a file somewhere on my file system that is storing a pdb or dll or similar that allowed Visual Studio to decompile the source code.
Where can I find this?
You can actually also find the loaded symbol files/pdb under the External Sources folder in Solution Explorer. This is available for Visual Studio 22.
read here : https://devblogs.microsoft.com/visualstudio/debugging-external-sources-with-visual-studio/

C# project won't load debugging symbols from VB6 DLL

I have a VB6 DLL which I have compiled with debugging symbols turned ON. A PDB file is created alongside the DLL.
However in the C# project which references this DLL, it is refusing to load the PDB file.
In the VS modules window it states
"Binary was not built with debug information"
for this DLL. This is incorrect...
If I right click in the Modules window and select "Load Symbols", and then manually select the PDB file, I get the error
"A matching symbol file was not found in this folder."
which also seems to be inaccurate.
I must be doing something wrong - any ideas? Thanks!

Breakpoints don't hit and/or Cannot find or open the PDB

Breakpoints don't hit and Cannot find or open the PDB
My breakpoints aren't hitting in a known good class. I know the class is working becuase the data is flowing through. They worked yesterday. I also tried a class that I haven't touched in weeks (another known good) and the breakpoints wouldn't work there either.
I have:
- Verified I am building in debug mode
- In my solution > Properties Configuration Properties > Configuration I verified each project is set to Debug and Build
- Went to Tools > Options > Debugging and disabled "Enable Just My Code"
- Cleaned and rebuilt the solution
- Restarted Visual Studio
- Rebooted my computer
I have the Modules window open in Debug. Many of my modules show "Cannot find or open the PDB file." Many show "Symbols loaded" (that is good.)
For the files that do not have matching PDBs I right-click and go to Load Symbols From > Symbol Path. Of course there is no PDB in the symbol path. When I right-click and go to Load Symbols From > Microsoft Symbol Servers I get nothing. I have searched the root of my drive looking for these specific PDBs.
Here is an example of the affected DLLs:
Microsoft.CSharp.dll
System.EnterpriseServices.dll
System.Runtime.Serialization.dll
System.Web.WebPages.Deployment.dll
System.Web.ApplicationServices.dll
Based on what I found online the PDB issue is realated, but if I can hit my breakpoints withouth PDBs then I'm happy.
I checked out: Visual Studio 2010 "Cannot find or open the PDB file" with no joy.
I would really like to hit my breakpoints.
Thanks!
PDB files should be in the bin directory along with your other files. They are created when you compile your project. If they are not there, you may have turned them off even while in debug mode. For Vb, look under MyProject->Compile->Advanced Compiler Options and make sure Generate debug info is set to Full. Not sure what the analog in C# is though.
Also for a web project, I had this problem when I had a release version running in the same app-pool as my debug version. Try using a dedicated app pool for your debugging if that's the case.
OK, this is totally embarrassing... I wanted to step through my web services, but to do so I needed to send information from my client application. I had my client app pointing at the wrong server. Bummer.
.Net Reflector can generate the PDB files for most assemblies referenced in your project. I have found it to be extremely helpful.
http://www.red-gate.com/products/dotnet-development/reflector/
Once installed, in Visual Studio: View > .NET Reflector Object Browser > Right click assembly and 'Enable Debugging'

VS2010 Debug attach to process / cannot find or open the PDB file

I'm trying to debug some of the examples provided in the Maya API SDK.
Building the DLL with Visual Studio 2010 in debug mode worked fine, and the plugin, once loaded into Maya, worked fine.
However after attaching, Visual Studio complains about cannot find or open the PDB file.
I ignored those warning and set some break points, but clearly VS does not break.
Regarding building plugins and debugging by attaching them to Maya, I've read:
https://alliance.seas.upenn.edu/~cis660/wiki/index.php?title=Debug_CPP_Plugin
http://devmaster.net/forums/topic/6965-how-to-debug-a-plugin/
http://www.creativecrash.com/forums/api/topics/help-33-how-do-i-debug-my-plugin
On SE, I have read the following suggestions:
Why is Visual Studio 2010 not able to find/open PDB files?
PDB does not match image Error
Visual Studio 2010 "Cannot find or open the PDB file"
In particular, I tried:
making sure that the plugin that I am loading into Maya is the one that I just built;
verifying that the PDB has the same name, is in the same folder, has been created at
the same time than the DLL;
loading manually the PDB ("A matching symbol was not found");
activating the Symbol Server in VS (fine, but I got only the Microsoft ones obviously)
Usually, putting the pdb in the same folder will always work - however, the times where this doesn't is usually because your dll is being loaded from elsewhere in the path and its not actually running the dll you think it is (at least, that's what happens to me).
Once your app is running, try and delete the dll - if you can, its not loaded. Or you can look at the path in the modules window in VS. That will also give a clue to why its not loaded and give you the option to manually load symbols from anywhere on disk.

Silverlight: How to debug dynamically loaded assemblies efficiently?

I dynamically load Silverlight class library projects on demand. (DLLs in a zip).
This is not the problem...the problem seems to be that I have to manually copy the pdb file(s) of those loaded assemblies (the assemblies belong all to the same VS solution) into the debug(output) folder of the main Silverlight application for debugging. If I don't do this, Visual Studio does not hold on breakpoints of those dynamically loaded assemblies.
I really hope I make something wrong here and not that I have to create a post-build script, which does that 'copy pdb job'.
Thanks for feedback.

Resources