sos.dll usage in visual studio 2013 - debugging

When I am reading docs about sos.dll #MSDN, encounter a note says
If you are using Visual Studio 2013, SOS.dll is supported in the Windows Debugger within Visual Studio
I know how to use sos.dll in the immediate window in Visual Studio 2012. But how to use sos.dll with visual studio 2013 debugger?

From MSDN documentation of What’s New for the Debugger in Visual Studio 2013 (Excerpt from the part Debug With Debugging Tools for Windows)
The SOS.dll (SOS Debugging Extension) that helps you debug managed
programs in WinDbg, is not available from the Visual Studio IDE. See
Debugging Managed Code Using the Windows Debugger
Looks like you may need to load them separately as being said Here

I couldn't get sos.dll to load in Visual Studio 2013 no matter what I tried.
I've resorted to good old WinDbg instead. I know it's not an ideal answer, but it appears to be the only possible solution to debugging with sos.dll. I'd really like to use sos.dll in Visual Studio 2013, but WinDbg isn't so bad once you learn its basics. It's actually very powerful, even if you know very little about the unmanaged world (like me).
How to load SOS in WinDbg

Yes you can use SOS from VS 2017. But you will need to install windows driver kit (WDK). Here is a screenshot of me debugging a process with command line debugger within VS 2017.
https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-user-mode-debugging-in-visual-studio

Related

Debugging the C++ Standard Library functions in visual studio

I've noticed that in VS 2010 Professional(in university) you can step into stl and stdlib functions and debug the actual insides, tried to do the same in VS 2017 Community but it didn't work, it even refuses to disassemble them, same goes for VS 2013 Ultimate(i assumed it's a professional version feature).
Now i'm wondering if there is a way to make this work in 2017 community or 2013 ultimate, am i doing anything wrong? I know you can probably find all the source codes on the internet, but i want to make it work in visual studio, so that i can actually debug it.

Debugging .NET Core on WSL by launching directly from Visual Studio

Everything I've read about debugging C# programs on Windows Subsystem for Linux either uses Visual Studio Code, or tells you to launch the program through bash then attach the debugger to the process.
This method works, but it's slow to initiate every time I'd like to debug a change. Is there a way to setup Visual Studio to start remote debugging from the IDE similar to how it's done in C++?
You can debug the .Net Core application on WSL2 from Visual Studio 2019 now.
You need to install/update to version Visual Studio 2019 v16.9.1.
There are the Prerequisites, You can refer to Start debugging with WSL 2.

Can't debug Visual Basic Scripts

I'm trying to debug a VBScript. I installed Visual Studio 2017 Community edition, but whenever I run my script (with a stop placed near the beginning of the script), the Just-in-Time debugger does not pop up and my scripts continues.
I've looked at the following, and nothing has helped:
Just-In-Time Debugging in Visual Studio
I've enabled it in Internet Properties.
I've enabled "Managed", "Native", and "Script" in Tools\Options\Debugging\Just-in-Time in Visual Studio 2017.
All the registry keys listed in the article are present in the registry.
I was able to follow the article C# Console App example. It did (although with variable success) eventually get into the debugger.
Visual Studio 2013 and VB Scripts
I tried debugging in the manner detailed here, but it never stopped at the stop or any of the breakpoints I set up.
The only thing I can think of is maybe the values in the registry are incorrect. The MSDN article didn't explicitly mention what the values should be.
Have other people tried using Visual Studio 2017 for debugging VBScripts? I've had luck using 2010 and 2012 at my work computer, but sadly I can't find downloads for those versions of Visual Studio for my home computer.
If anyone has any ideas, please let me know.
If you run your VS as the admin, and enable the Script debugging under TOOLS->Options->JIT debugging, how about the result?
I used the VS2017 Enterprise version before:
Visual Studio 2017 debugging vbscript
Or check the workaround in this feedback which is similar to this issue:
https://developercommunity.visualstudio.com/content/problem/30845/vs2017-script-jit-debugging-is-not-working.html

Debugging information does not match, when using v60 platform toolset inside Visual Studio 2013

I am using Visual Studio 2013, but I'm in need to develop an old project using the Visual C++ 6.0 compiler.
For this purpose, I have been using Daffodil with no problem on Windows 8.1 for a while.
(You can read more how to use the VC++ 6 compiler in newer Visual Studio versions in this StackOverflow question: Is it possible to use the VC++ 6 compiler in Visual Studio 2012?)
Now I got a new Windows 10 machine, where I reinstalled Visual Studio 6, 2010, 2013 and Daffodil.
Using v60 build tools (Visual C++ 6.0 compiler), project gets compiled fine.
However, when I try to debug, VS says that "debugging information does not match", and I am unable to set breakpoints etc., but:
PDB file is there, same folder and name of debug executable;
Application built in Debug mode, with debug information enabled;
Debugger works fine when using Visual Studio 2010 or 2013 build tools;
Debugger works fine if opening the project inside Visual C++ 6 IDE.
I tried reinstalling all Visual Studio versions as well as Daffodil, but didn't solve.
Any clue what could the problem be?
Finally I actually found a working solution!
for VS 2013:
Enable "Native Edit and Continue"
under Tools->Options->Debugging->Edit and Continue
for VS 2015:
Enable "Use Native Compatibility Mode"
under Tools->Options->Debugging->General

Does Visual Studio have debug symbols available?

I'd like to track down a possible bug in Visual Studio, but that's awfully hard without the debug symbols for Visual Studio itself. Does Microsoft make these available?
An up-to-date Visual Studio should already have the option to load symbols from Microsoft (Check: Tools->Options->Debug->Symbols). When it comes to debugging Visual Studio itself, have a look at this blog post.
No, the closest thing are the debug symbols for the libraries which can be downloaded following the the steps here. But like I said, these are not for visual studio itself.
Based on my experience, most of the Visual Studio Dlls had symbols in the symbol server. msenv.dll is one of the most important.

Resources