Can I get reverse debugging functionality for Visual Studio 2013 Professional? - visual-studio-2013

I know that GDB comes with reverse debugging, but is there a way I can get this functionality in Visual Studio 2013 Pro?

Visual Studio (2010, 2012, 2013 Ultimate only) does have a feature that allows you to step backwards from a breakpoint or exception (Intellitrace), and the values in the Locals and Autos panes (as well as DataTips that appear on a hover over a statement) will the show the state at that (previous) point. Unfortunately, Intellitrace is not available for 2013 Professional. In addition, it has only limited support for F# and does not support C++ or JavaScript.
Right now, (since no 3rd party extensions exist that I’m aware of) your best option is looking at the call stack to examine the source code that executed prior to the breakpoint or exception. BTW you can “drag” the debug point up and down in the debug gutter of the VS source window but this will only set the point of next execution (any previous state information is not displayed).
Since GDB does have this feature you could try something like VisualGDB or WinGDB, but I'm not sure how well reverse debugging is supported in either of these two or their stability once introduced into the most recent VS IDE.

Related

How to (re)enable breaking on exception in Visual Studio?

While doing pair-programming on an React project with Visual Studio Professional 2017, my partner was working on my machine and disabled some debugger option to see less warnings. I want to undo what he did, but he is not available any more, so that's why I am asking here. I remember faintly that he said something about disabling "some breaking".
I am sure it must be somewhere in the options window which appears after Debug > Options and on that popup somewhere under the entry Debugging. I attached a screenshot of Debugging > General. I already tried the toggling the 3rd check-box, but that did not do the trick.
The interesting thing is that in the sub-window Output I used to see all those exceptions logged, but I do not see them anymore.
References
How to turn off warnings while debugging in VS Code?
Enable a single warning in Visual Studio
How to re-enable breaking on unhandled exception in Visual Studio 2012 Express for Web?

Uninstall F# from VS 2015

I have recently installed Visual Studio 2015 (Enterprise), and although I only selected C++ from the programming languages list, it has also installed F#. A language I have never used and will not use, simply because I'm working with C# and VB currently, and I'm satisfied with the results I get. My plan is moving to C++ after I learn C#, so I have nothing to do with F#. It's only taking up space from my disk and I want to remove it. I've been looking all morning about an easy way to do so, but all I could find was a lot of questions regarding earlier VS releases and somehow managed to successfully remove the F# project templates. But the rest is still there - screenshot:
As you can see I cannot uninstall it via Extensions and Updates, nor I can find it in Programs and Features. I could find some F# SDK and F# for VS stuff in the registry, but I'm not experienced enough with it to find the uninstallers. Any ideas?
Goto Programs and Features in Windows, and select Visual Studio Enterprise 2015 and click Change, when the Setup dialog appears, select Modify then untick the following:

Tool "Code Map" of VS2012 in VS2010

I'd like to use Code Map, which can be used in Visual Studio 2012, also in Visual Studio 2010.
If you don't know what Code Map is, this is how it looks like:
here's a tutorial from Microsoft: http://msdn.microsoft.com/en-us/library/vstudio/dn194476.aspx
Is it somehow possible to use this in VS2010 or is there any similiar tools, which displays the different method calls? By this I want to display a method Method1() which calls another method called Method2(). This should be displayed like in the CodeMap (not by using hierarchy call, I want to see it with a UI). It should be free or an extension for VS2010.
I'm not aware of a free version that offers something that the Visual Studio 2012 Ultimate Edition offers, but you have a few alternatives:
NDepend features a Call Graph option
You can open the VS2010 solution in VS2012
Debugger Canvas offers a similar feature while debugging
Architecture Explorer Dependency Graphs and Sequence Diagrams

What tools are available for F# debugging?

Are there gdb (or similar) for F#?
What tools/programs do F# programmers normally use for tracing F# code in Mono?
Does Visual Studio 2010 provides some integrated debugging tools for F#?
Visual Studio 2010 provides a fantastic debugging experience for F#, including breakpoints, tracepoints, call stacks, locals, stepping, set next statement, threads window, poking new values into variables, debugger visualizers, conditional breakpoints, immediate window, ... the only caveat is that the last two use the C# expression evaluator (F# does not have its own debugger EE), which means you must type e.g. C# syntax into the 'immediate window'.
(Everything I mentioned above is available for free if you download the free VS2010 Integrated Shell and the F# CTP.)
I am not sure what is available right now for Mono, but would not be surprised if there is something decent already, and something even better coming in the not-too-distant future.
Mono has its own debugger. The debugging format situation is slightly confusing because Visual Studio will generate pdb files which are needed for their debugger. Mono uses the alternative mdb format. fsc.exe (The f# compiler) will generate the appropriate ones for whichever platform it is run on.
The Monodevelop IDE can be used for general debugging of .net assemblies, even though it doesn't support a released f# version yet. You'll need to refer to your project's generated assemblies in the project.
Note that you also have to pass '--debug' to mono if you're executing it on the command line and want, for example, file names and line numbers in stack traces.
Any .NET debugger should work on F# code. The Visual Studio debugging experience is basically the same as for any other language (e.g. you can set breakpoints in the editor, etc.). I can't speak to what tools people use on Mono.
LinqPad understands F# code but I did not try it. A paid version gives you debugging.

Using windbg from Visual Studio

Is it possible to use windbg commands like !locks and .loadby sos mscorwks from the Visual Studio command window (in a debug session)? I've noticed I can use eg k to print a stack trace, so I was wondering if there is some way to get access to the other commands.
Yes you can do this.
Attach Visual studio 2008 to your process for debugging.
Break at some code.
Go to immediate window
type !load sos
Now you are free to use any of the windbg commands like !EEHeap,!DumpHeap
There are some conditions. You need to enable unmanaged code debugging in your project properties. Normally in 64 bit version studio doesn't support this.
Have fun.
Visual Studio 2012 has the "Windows User Mode Debugger" transport in the "Attach to Process" dialog. This allows you to use windbg commands in the immediate window.
Source: Use the WinDbg Engine in Visual Studio User-Mode Debugging
Starting with Windows Driver Development Kit (WDK) 8.0 the Windows debugger is integrated into Visual Studio (see Debugging Environments). Installing the WDK on top of a Visual Studio installation will enable a developer to pick a number of debuggers from the Attach to Process dialog, or set the debugging engine in a project's Debugger settings. This has been verified for Visual Studio 2012 and 2013. The way I read the MSDN link above, this should also work for any other IDE that is supported by the WDK 8.0 and above.
While WinDbg offers a lot of powerful commands, there are some drawbacks as well. This list is not exhaustive, and merely contains those issues I did encounter:
Cannot attach to more than one process at a time. While not generally an issue, this is quite unfortunate, if you do need to debug more than one process at a time. The Visual Studio debugger can attach to any number of processes simultaneously.
WinDbg will not use the symbol settings from your Visual Studio IDE (tested on VS 2012 Update 4). While you can configure the IDE where to look for debugging symbols, WinDbg will not honor those settings. WinDbg will use the _NT_SYMBOL_PATH environment variable, and/or the configuration set through .sympath.
Different syntax for function breakpoints. This is a minor annoyance, since you cannot use Visual Studio's syntax to specify function breakpoints. This also means, that function breakpoints are ignored that have been set using the Visual Studio syntax. What's more annoying, though, you do get a warning dialog for each when launching a debuggee.
No support for Tracepoints. I've been using tracepoints extensively, to unintrusively insert tracing into a debuggee. If you are using tracepoints as well, this may prove to be more than just an annoyance.

Resources