Open Sourcing Visual Studio’s GDB/LLDB Debug Engine
blogs.msdn.com
blogs.msdn.com
Yes and no :P Afaik gdb can for particular languages do everything the VS debugger can do, even more (or so I heard once), but the major and utterly important difference is the fact the VS debugger comes with the IDE and the 'I' in the word makes it so much easier to use than anything else out there that usually you can get a lot done with it in a much shorter timespan than with other debuggers. And as such gives people the right to call it the best debugger, imo.
Not to nitpick or disregard the rest of your comment (VS has a really good debugger), but "best" always required qualifying.
Best in what cases? Best in what way?
There are times when the "best" debugger available without a doubt is WinDbg, with it being archaic, oldfashioned, command-line based, completely un-automated and all that fully accounted for.
Why? Because I can copy the 500KB exe-file into a production environment, run it there and debug issues found nowhere else.
And obviously you're not going to install VS on your production-server, and if you did, those builds are release-builds anyway, without debug-assistance or PDBs, so the VS-debugger would be handicapped anyway.
So yeah. Just a slight nit-pick that "best" always has to be qualified.
You first please :)
I've tried doing that several times and always ended up giving up. If it's not firewalling, its UAC or cross domain trust issues, or DCOM configuration, or process permissions and probably 200 other things which has failed on me in the past.
It only works in the most trivial of configurations. Back in the real world I've only been able to use it once or twice, non-repeatably.
Visual Studio misses features like Python scripting, which for instance in gdb allows you to define pretty printers for your objects, which is immensely useful for complex data structures. The VS debugger also does not have a proper MI, at least I never heard of one. The only thing I miss from gdb is "edit and continue", which I admit is pretty cool.
Why? I do it all the time and getting line numbers in the exception logging seems like a nice bonus.
For people accustomed to IDEs, the fact that they don't have to remember "n" means "next," "s" means "step into," "info breakpoints" will say which breakpoints you've set, etc. is a big deal. Yes, you can use DDD for that, but frankly, it doesn't look as nice.
Additionally, if you want to see what value a variable has, simply hover over it with the mouse pointer. This works for ints, but it also works for std::vector<std::map<int, std::string> >. You can get the same functionality in GDB, but it takes a little work to set it up.
It's not (just) features, it's the interface to those features. The possibility cap may be lower for you, but that doesn't matter to people who just want an approachable interface to step through their code.
This is the part where I'm an elitist asshole: There are developers that program by spending all day, every day in the debugger. They're almost never going to do anything fancy, they just want an easy way to fix their code. Command line gdb is too much effort to learn, and of the IDEs that hook into debuggers, VS does it the best.
That said, having been working a lot with node/iojs modules the past few years, I find that experience even better. I'm pretty sure others who are using scripted languages with a REPL can probably state the same. Running in an environment where you can jump in anywhere, call a particular script and replace variables for testing is a powerful experience.
I don't mean to start a scripted vs. compiled war... they both have their place. Just mentioning because people will reach for a compiler for things that could be much simpler with a scripted environment more often than not.
In Ruby-land, the pry gem called on a binding (binding.pry) is a godsend.
Things I quite like about it:
- no grammar to the command set, just keypresses, and no need to press Return. gdb drives me nuts with its command line... feels like trying to count while somebody shouts random numbers in my ear. I'd probably get on better with a command-line driven version of Photoshop than I do with command-line controlled debuggers
- passable support for mixed assembly language/source code debugging (same step commands in all cases)
- dockable UI that's satisfactorily configurable and updates as you work, so you can see a lot of stuff at once. I find the gdb text-based UI like trying to look through a telescope the wrong way, and it's even worse if you go for the line-by-line TTY mode
- it displays code using the normal VS editor, so you can use the code browsing functionality to look around the code as you work
There's plenty of scope for improvement, so while it does a reasonable job, I'm maybe not sure about "best". But... I don't appear to be unique in preferring it to gdb. So if we're going for some kind of democratic vote, then maybe an argument could be made ;)
But overall, the main thing I like about the VS debugger is that it's integrated quite well into the VS workflow. When you run your project in VS, you run it under the debugger. You have other options, it's true - but running under the debugger is the most obvious one, so that's what you do. There are times where you need rather complicated stuff doing, and VS is sadly lacking in that regard. But most of the time, when your code fucks up, the VS debugger provides enough to let you figure the problem out, and your code is already running under it, so there you go.
(I never found a way to get gdb working quite so well - it starts out with your process stopped, for example, so you have to type "run" to get it going. And I never figured out any way to stop your process without being dumped back to the gdb prompt, like Shift+F5 in Visual Studio. If I actually liked working in gdb, I'd probably just get over this, and/or put the time in to figure out how to fix it. But... I don't.)
Sometimes GDB won't show locals properly, and just shows <optimized_out> even though it's an -O0 -g build.
Also, GDB can get really slow with large binaries with loads of symbols when you have pretty printers installed, even to step through stuff. VS's debugger copes with the same code, and displays everything.
Are there any features in VS debugger that are better or non-existent in Java IDEs?
Another thing I frequently miss in other debuggers is being able to place break-points on statements, not just lines, e.g. the individual parts in a for loop header.
I'm also not sure if you can execute Java 8 lambda expressions in the watch window while debugging.
Have you used any of the debuggers one finds in Smalltalk environments, out of interest?
EDIT: typo
What license will the source code be released under?
We plan to release it under the MIT open source license.
This is the best part. Have they finally seen the light?GDB/LLDB it is good that Microsoft is open sourcing their debug tools. Microsoft has been struggling with improving Visual Studio and Dotnet, so in open sourcing them or parts of them in CoreCLR, Visual Studio Core, and then GDB/LLDB they are letting open source developers participate in improving them.
Sure it isn't the full version of Visual Studio, I don't expect Microsoft to give away everything but small parts of it. Sometimes less is more, in that the fewer lines of code the smaller the program the faster it runs.
I would like to see an Office Core and SQL Server Core as well if they can.
Not to be confused with the RC that got released today, which isn't actually a Release Candidate.
Also there is a link that shows how to remote debug a Linux process from Visual Studio - http://blogs.msdn.com/b/vcblog/archive/2015/04/29/debug-c-co...