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.
Related
I want to write an extension for Visual Studio Code (VSCode) which will allow me to debug a C++ program with Visual Studio's native C++ debugger instead of gdb (which currently is the only option VSCode supports). I looked at the Visual Studio Debugger Extensibility. But it only explains how you can create a new debug engine and call it from Visual Studio as a front end. What I want to do is the opposite. I want to call the existing Visual Studio C++ debug engine from a different front end, which happens to be VSCode. There is no documentation on the Internet how I can achieve this. Can anyone please help?
I'm on the VSCode team. To use the VS debugger from VSCode, you will need to author a debug adapter extension. Here's some documentation on getting started, and here's the complete debug adapter protocol reference.
Try look at some existing implementations to get started:
Mock debugger – simple example debugger
Node debugger - node.js debug adapter
For C++, also check out C++ tools for VSCode.
Hope that helps.
Edit - Seems I misunderstood the problem. Here are some thoughts on consuming the VS C++ debugger from an external application.
To my knowledge, Visual C++ does not have public APIs or interfaces that allows external programs to easily interface with them. Other languages have better stories, since they often leverage external libraries or were designed with documented debugger protocols. The GDB machine interface is a good example of this sort of design.
My best suggestion is that you could try to leverage the Visual Studio Env.DTE interfaces to control VS programmatically. EnvDTE is not well documented and may not be exactly what you are after, but it is pretty powerful.
I would like to use VC2010 to handle a BCB 2006 project I have. I do not want to convert the code to VC since much UI will need to be ported. I just want to be able to view build & debug from VS IDE.
Viewing: I assume once I create VS projects for the native BCB code viewing will be possible, although the UI editor will not.
Building: I found the "C++ Native Multi-Targeting" option of VS, although I'm not sure on what to set the different options there to (Daffodil is mentioned as helpful although I'm not sure what the added value is over existing functionality).
Debugging: not sure how to do this at all from within VS. There are some stand alone console tools that convert debug info files e.g. tds2pdb (wheres the documentation link?).
If anyone has experience with such a task I would thank you for any advice.
No. The C++ Builder IDE is a stand-alone, separate Win32 executable that has nothing to do with VC or Visual Studio, and can't be embedded in it in any way. You'll have to use C++ Builder itself to view, build, and debug it's apps; there's no way to do so as part of Visual Studio.
Even simply using the C++ Builder code will most likely not be possible if there is any UI involved at all. C++ Builder's GUI components are based on the Visual Component Library (VCL) that it shares with Delphi, and therefore it uses a Delphi Object Pascal compiler to build those parts of the application. There are also data types and set operations that VC will not understand or support, and some special #pragmas and #hppemit statements the VC compiler wouldn't be able to use.
As the title states really, is it possible to write assembly code in visual studio?
Im looking for an easy to use IDE for writing intel assembly language. I looked at a few IDEs a few months ago and unless they required lots of configuration settings (I copy and pasted examples into the IDE) they wouldnt work......
There must be a simple IDE very similar to VS where you can write your assembly, pick CPU and then execute?
The inline assembler in Visual Studio isn't reliable, but you can use Visual Studio in conjunction with MASM (the Microsoft Macro Assembler) to write straight assembly programs.
http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/c53fd4fd-e239-464a-b512-2b2fc8745c88
http://msdn.microsoft.com/en-us/library/afzk3475.aspx
http://www.masm32.com/index.htm
http://www.daniweb.com/software-development/cpp/threads/8072
http://www.infernodevelopment.com/introduction-masm32
Writing the "glue" code that opens a window, sets up output, etc in assembly is rather painful, so you may find it more comfortable to write most of your program in C++, and just a couple of files in assembly. That way you can start by writing simple test functions in straight assembly, and call them from your C++ framework.
This should help you out Setting Up Visual Studio 10 for MASM32 Programming
I am new to C# and wondering whether "windbg" or "Visual Studio Debugger" would be better tool for debugging managed code?
For the past couple of years, I have been doing development in C++ and I am comfortable in using windbg as compared to Visual Studio debugger. However, I am not sure whether windbg would work best in the case of managed code as well?
Is there any other debugging tool besides windbg and Visual Studio Debugger which works even better than these in debugging managed code?
WinDbg needs SOS or PSSCOR2/4 to debug managed code, but with either of those you get a very powerful debugger. However, I would not recommend using only WinDbg for managed code as support for source debugging is rather limited at the moment (and has been for a long time). You might also want to get SOSEX as it complements SOS/PSSCOR with additional useful commands.
In my experience Visual Studio works very well for regular debugging and WinDbg+SOS/PSSCOR2 is excellent for all those hairy problems such as memory issues, deadlocks and so forth that VS doesn't handle very well.
I'm using Visual C++ in Visual Studio 2010 Express, and in the past I remember when you use a string object and after the dot (eg: .) all the member functions will show in list, but that's not happening.
string myString = "hello world";
myString.
After typing the dot, all functions that are part of the string class don't show. Where in Visual C++ is the setting to make them show?
The functionality you refer to is called IntelliSense in Microsoft-speak, their version of autocompletion for variable names, functions, and methods.
IntelliSense is not supported in Visual Studio 2010 for C++/CLI projects. You will only get IntelliSense for projects written in native C++ code. This is explained in more detail here on the Visual C++ Team Blog. There is also a bug filed on Microsoft Connect; the official word is this:
Thanks for your feedback. Unfortunately in this release we had to cut the intellisense support for C++/CLI due to time constraints. If you want to get some intellisense like quick info and memberlist on the native classes you can get it by choosing no /clr support in the project properties.
Thank You!
Visual C++ Team
This is unfortunate news for many of us who work with C++/CLI projects, and we aren't left with many options. A question regarding those options has been asked here: What are people replacing the missing C++/CLI Intellisense in VS 2010 with? The summary is people are either going back to VS 2008
(I believe the Express Edition of 2008 is still available for download if you look around), or purchasing third-party software such as Visual Assist X that promises to bring back IntelliSense.
It's worth mentioning, however, that Microsoft does not regard C++/CLI as a "first-class" .NET language. There's little (if any) reason to start new projects using the language. It's designed for interop purposes between native C++ and managed C# applications. If you want to write C++, you should target the native Windows API (create a new Win32 project in VS). If you want to write managed .NET code, it is highly recommended that you use C# instead (that's a different version of Express that must be downloaded separately). The syntax is very similar between C++ and C#, but you will still have to learn the .NET Framework and idioms. Both native C++ projects and managed C# projects have very much improved IntelliSense support in Visual Studio 2010, so you're guaranteed to be much happier with either of those.