Logging the flow of control in Microsoft Visual Studio Ultimate 2013 - visual-studio

I am working with Microsoft Visual Studio Ultimate 2013, on an extremely large code base.
I am currently trying to debug an issue, but i am unable to place breakpoints correctly, and relying on pure guesswork and hit-n-trial.
Is there any way by which we can list the entire trace of flow of control in VS 2013?
(The entry and exit of the functions which are called)
(PS: There are no explicit logging statements written in the code).

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.

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

Visual Studio 2015 update 3 crashing after "Getting DataTip text..."

When debugging a C# application in Visual Studio 2015, I am very often getting this message when hovering the mouse over a variable:
After this it freezes and restart, making it impossible to debug.
Anyone have any clue?
Like that thread shared by duDE, please disable the option "Enable property Evaluation and other implicit function calls" under Tools->Options->Debugging->General.
It seems that checking this option:
Tools -> Options -> Debugging -> General: "Use Managed Compatibility Mode".
avoids Visual Studio 2015 from crashing but disables Edit and Continue... which is no good.
So, I am still looking for a better answer.
Sources:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/8653d0d1-c7ed-4194-8fdc-f183d4ff4ec2/problems-with-debugging-in-vs-2015-when-execution-is-in-a-thread?forum=vsdebug
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f3e0c708-0cb4-4e15-9f80-8e713870ebcd/debugging-cant-hover-over-variables-to-see-their-values?forum=visualstudiogeneral
Datatips (mouse hover over variables in debug mode) not working in Visual Studio 2012 / Win 7 64bit
Visual Studio 2015 Debugging: Can't expand local variables?
https://blogs.msdn.microsoft.com/visualstudioalm/2013/10/16/switching-to-managed-compatibility-mode-in-visual-studio-2013/
Quoting the last one:
In Visual Studio 2012, we introduced a new managed debug engine that provides us the ability to more rapidly add new features compared to the older implementation. This can be seen by the number of features introduced in Visual Studio 2013 after only a single year including Managed Return Values, .NET 64-bit Edit and Continue, Async Callstacks Enhancements, and Improved Tasks Window to name a few. Unfortunately, there are still a couple scenarios that are not supported yet with the new debug engine, so in these cases you will have to switch back to the legacy engine.
...so it seems that this is not new.
This issue should be fixed in Visual Studio "15" Preview 5 (available here. For Visual Studio 2015 Update 3 there are, unfortunately, no known workarounds other than those already mentioned.

Does InfoPath 2013 support Visual Studio 2013?

I am trying to develop custom code for an InfoPath 2013 form. I have Visual Studio 2013 Professional installed, but when trying to edit code I get the following message:
The following external components are required to edit your form code. Please install them and try again.
Microsoft Visual Studio 2012
Visual Studio C# Support
Microsoft Visual Studio Tools for Applications 2012
C# support is installed, along with Visual Studio Tools for Applications 2012.
Does InfoPath 2013 just not support VS2013?
Unfortunately No
MS has really been making some bad decisions lately
Firstly VS2013 was released so they forced people to upgrade if you want to develop for Windows 8.1
Secondly, MS have announced that they are dropping InfoPath and have yet to provide an alternate solution. Support is still available but InfoPath 2013's successor will be another solution.....i'm guessing Azure Forms or SharePoint forms, something like that
Very disappointing
As you have found, adding code to an InfoPath 2013 form requires Visual Studio 2012. I am not aware of a way to use it with any other version of Visual Studio.
Depending on what you plan to use the custom code for, you may be able to get by with the qRules library (full disclosure: I am one of the developers of this library). It contains many of the most common features for which people tend to use code within InfoPath, and you can use them simply by executing rules within your form, eliminating the need for any version of Visual Studio.
If there is a specific thing you are looking to do with code, I can tell you whether it's possible to do so with qRules, but you should open a separate question for that (and let me know here).

How to put error handlers in all vb functions

We have multiple vb projects.We want to put error handlers in all functions, and error handler should write to a file.Are there any tools available - we have looked at codesmart and vbwatch.
MZ-Tools, which is free and very easy to install, is often recommended:
Supported Microsoft Development Tools
Visual Studio 2008 (except Express editions)
Visual Studio 2005 (except Express editions)
Visual Studio .NET 2003
Visual Studio .NET 2002
Visual Basic 6.0
Visual Basic 5.0
VBA Editor (Office 2000-2007 or others)
Supported Programming Languages
Visual C#
Visual Basic .NET
Visual C++ (partial support, most features)
Visual J#
Visual Basic 6.0 and 5.0
Visual Basic for Applications (VBA)
Here's a freeware program:
http://wareseeker.com/Software-Development/automatic-error-handling-pro-1.1.0.zip/238557
and here's some source code for doing it yourself:
http://www.nigelrivett.net/VB/VBAddErrorHandling.html
Make sure you test performance before putting it in all procedures. Our Error Handler solution (VBRig) noticeably impacted math calculation and screen redraws in our CAD/CAM application. It wasn't badly written but the addition of doing the logging hundreds of time added up.
We switched to use error handling in all event routines and selected other area. While not ideal from a design standpoint it brought performance back up to what it needed to be.

Resources