Can't debug Visual Basic Scripts - visual-studio

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

Related

Visual Studio Remote Debugger Failed to Start

I recently installed Visual Studio 2017 on my laptop (running Windows 10). I have a C++ project using the OpenCV and Eigen libraries, and it seems to compile correctly, but when I try to run the Local Windows Debugger, I get an error message that says:
Visual Studio Remote Debugger (MSVSMON.EXE) failed to start. If this problem persists, please repair your Visual Studio installation via 'Add or Remove Programs' in Control Panel
I ran the Repair tool it suggested, with no luck. I also checked for a solution online, and came across a support page (Link). I tried turning off my anti-virus and firewall as per the suggestions on the support page, but that didn't get rid of the error message. My laptop is brand new, and I just installed Visual Studio and the Remote Debugger, so I don't think it would be the case that the version of the Remote Debugger doesn't match with that of Visual Studio. All of the other suggestions are for people doing remote debugging, but I'm doing a local debug.
Any help/suggestions on resolving this issue would be appreciated.
Firstly close the Visual Studio.
Goto AppData\Local\Microsoft\VisualStudio and select version (Ex: VS 2015 has 14.0 folder).
Then delete ComponentModelCache folder.
Start the Visual Studio.
Find what's preventing msvsmon.exe from running.
I encountered this error in Visual Studio 2019 while trying to start debugging a .net 5 console application. I tried to run C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Remote Debugger\x64\msvsmon.exe and found that User Access Control dialog opens and is asking to run it as an administrator. So two solutions were possible for me, either run VS2019 as Administrator or remove the Run this program as an administrator setting for msvsmon.exe.

Visual studio 2013 ultimate Intellitrace issue

I have Visual studio 2012 Professional already installed on my machine. I installed Visual studio Ultimate. I am not seeing Intellitrace windows or in IntelliTrace options in Tools-->Options in VS 2013.
I know, IntelliTrace is not available with Professional version. Am I missing anything?
What you are doing here should be supported. There are a couple of things that you can do to trouble shoot the issue.
1) Double check that you are actually launching Visual Studio 2013. I know that this sounds silly, but different versions of Windows will set up file or project associations differently. So, though you have installed 2013, it is possible that your regular workflow is actually still launching 2012. Check the splash screen and/or the Help > About dialog.
2) Reset Visual Studio. It is possible that something got corrupted in your extensions cache during your installation that is preventing Visual Studio from recognizing IntelliTrace. This should be relatively simple:
Launch the "Developer Command Prompt For Visual Studio 2013"
cd to [Program files x86]\Microsoft Visual Studio 2013
Execute the command "devenv /updateconfiguration" followed by "devenv /setup"
The last step may take a number of minutes depending on your system configuration. After it is finished, relaunch Visual Studio to see if IntelliTrace is available.

Visual Studio crashes when locking computer or starting another instance

I have the problem that Visual Studio 2013 crashes when I lock the computer or start another instance of Visual Studio.
I use Visual Studio 2013 with latest patches applied. I always start Visual Studio as Admin.
This seems to only happen with a certain big solution. This problem did not occur to me with other solutions.
I tried to delete the solution and make a clean checkout from TFS, but Visual Studio still crashes.
I know this is not much information, but do you have any idea how to fix this or how to what else I could check?
Additional Information: This still happens even with Visual Studio 2015 on a fresh Windows 8.1 installation...
Here's the error:
Use the following steps to solve the issue:
Source: http://resharper-support.jetbrains.com/entries/24765142-Visual-Studio-with-ReSharper-is-freezing-and-or-crashing
I would copy the solution with quotation but as you can see, there is a lot of text to edit.
Start Visual Studio using the /log switch. Then check the created log file for warnings and errors:
%APPDATA%\Microsoft\VisualStudio\11.0\ActivityLog.xml
If you use a Web Browser to view the file, it will be nicely formatted, due to the accompanying xsl-sheet.

sos.dll usage in visual studio 2013

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

Visual Studio 2010 and 2013 not working on my system

I apologize as this may seem as bit of a general question.
I have developed a couple of VB programs using Visual Studio 2010 Professional and others on Visual Studio 2013 Ultimate. While I have not done any work in about a month with either version of Visual Studio, I thought I would go in and start work on a new project.
After entering some code in Visual Studio 2010 using WinForms, I found I was unable to run the code in the debugger (pressed the start button and F5).
It acted like it would start, then it just stopped and returned back to my code.
I thought I would try it on another program that was completed and working a couple of months ago, but I had the same issue present itself. Attempting to use Visual Studio 2013 had the same effect.
Any ideas from anyone? Has anyone else experienced this same issue recently? Once again, I do apologize for the lack of examples here, but I'm not sure what I can include to show the problem.
IMO, you should try resetting visual studio settings (and a restart may solve the issue)
you can try following
do it via visual studio -> tools -> import export settings
or you can run this command devenv /resetuserdata
or checkout this http://msdn.microsoft.com/en-us/library/ms241273.aspx

Resources