6 ms·
Open Sourcing Visual Studio’s GDB/LLDB Debug Engine
- bithush 11y agoI am really loving this new Microsoft. What I would love would be for Microsoft to offer resources to get Clang/LLVM working on Windows as well as MSVC so it can be a first class compiler in VS.
- Alphasite_ 11y agoI think they're doing some work on it, and I believe someone else is also supporting LLVM for windows as well.
- laichzeit0 11y agoWhat 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?
- andyjohnson0 11y agoThis isn't new. The entire .net framework was released some time ago under the MIT licence. [1] [1] https://github.com/Microsoft/dotnet/blob/master/LICENSE https://github.com/Microsoft/dotnet/blob/master/LICENSE
- solutionyogi 11y agoI personally don't use debugger that much but whenever I have used it, I have always been amazed at VS's debugger capability. I don't think I am exaggerating when I say that VS has the best debugger across all languages/platforms. I think this is a GREAT news for all the developers.
- stinos 11y agoVS has the best debugger 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.
- yoklov 11y agoStill takes a lot less time to use VS than to use the XCode debugger IMO. Having to expand anon struct/union members makes debugging in some codebases a real pain.
- beached_whale 11y agoNot sure if available in XCode or GDB, but the ability to tell VS debugger how to display custom structures is very useful
- omtose 11y agoYou cannot step back with VS's debugger, can you?
- WDCDev 11y agoYou can. I just drag the arrow that appears on broken execution "upwards" to a previous line of code. There might be another way to do it.
- Lawtonfogle 11y agoDoes this undo previous commands or does it just rerun code?
- to3m 11y agoNeither - it changes the program counter, ready for the next operation. It's not terribly cunning, but it's sometimes useful.
- josteink 11y ago> VS has the best debugger 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.
- plorkyeran 11y agoVS can debug processes on remote machines with only a small helper process running on that machine, and while you shouldn't deploy PDBs onto your production servers, there's no reason not to generate them for your release builds.
- josteink 11y ago> VS can debug processes on remote machines with only a small helper process running on that machine 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.
- plorkyeran 11y agoI've never had it be particularly difficult. It does generally require a VPN since forwarding DCOM over ssh is challenging.
- deng 11y agohttp://en.wikipedia.org/wiki/Gdbserver http://en.wikipedia.org/wiki/Gdbserver 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.
- green7ea 11y agoI've seen this best debugger thing come up a few times before. I'm currently working with windows on a project right now and I'm finding the VS debugger more limited than GDB. With GDB I can create scripts which analyse and print complex memory layouts very quickly and efficiently. With valgrind, I can find memory leaks and other unwanted behaviors. With gcc's dump-tree family of options, I can see how my code is turned into assembly. I haven't been able to do these things well under VS and I think it comes down to preference and habit. So my question is, what makes VS's debugger the "best debugger", what am I missing?
- maxlybbert 11y agoEase of use and discoverability. 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.
- forgottenpass 11y agoSo my question is, what makes VS's debugger the "best debugger", what am I missing? 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.
- tracker1 11y agoI have to agree here... When I've had to fall into using a debugger pragmatically VS integration is probably the best experience I've had (eclipse, intellij etc don't compare). 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.
- vbcr 11y agoI have debugged a C# application in VS and a Java application in IntelliJ and in Eclipse. I did not see any debugging features in VS that can claim its superiority over the others. May be I have not used all the features that were available. Are there any features in VS debugger that are better or non-existent in Java IDEs?
- mtVessel 11y agoI haven't used IntelliJ, but "Set Next Statement" was what I missed most using Eclipse.
- ygra 11y agoIntelliJ doesn't seem to have it either, which is a pity. It happens quite often that I accidentally step over a line that does something I wanted to step into. In VS, if I know that that line doesn't have any bad side effects when executed twice, I can just pull the instruction pointer (the yellow arrow) back up and step into the line this time. 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.
- Locke1689 11y agoUnless you buy JRebel, VS supports a lot more Edit-and-Continue (JVM hot code swap) operations. I'm also not sure if you can execute Java 8 lambda expressions in the watch window while debugging.
- rasur 11y ago>I don't think I am exaggerating when I say that VS has the best debugger across all languages/platforms. Have you used any of the debuggers one finds in Smalltalk environments, out of interest? EDIT: typo
- callesgg 11y agoNice to see that Microsoft as a company actually understands where their customers are going.
- TillE 11y ago> We will be releasing the source code by the time we release the RTM version of Visual Studio 2015. Not to be confused with the RC that got released today, which isn't actually a Release Candidate.
- MarkSweep 11y agoI've been using VisualGDB at work to do embeeded programming on a Cortex M4. Hopefully these guys can benefit from this new Microsoft code, as some things like expression eval don't work in VisualGDB.
- GeorgeHahn 11y agoDoesn't this replace VisualGDB?
- MarkSweep 11y agoVisualGBD would still potentially be useful for setting cross-compilers and in-circuit debuggers. But yeah, I think you could probably recreate the experience by putting the pieces together yourself.
- shmerl 11y agoSo, will it enable making a user friendly frontend to GDB for Linux?
- WorldWideWayne 11y ago"... it should be relatively easy to adapt the code to work correctly with your other GDB and LLDB targets from Visual Studio". Right now it targets the version of GDB that ships with Android NDK 17+ and the version of LLDB that Microsoft ships to support iOS debugging. 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-code-on-linux-from-visual-studio.aspx http://blogs.msdn.com/b/vcblog/archive/2015/04/29/debug-c-co...
- orionblastar 11y agoI miss the days of MASM and Codeview. I used to debug DOS programs in Codeview and could step into and out of code lines and even modify the code. By changing a JE to JNE I was able to bypass the Lotus 123 2.0 protection so it could be installed on a Netware drive instead of just a floppy disk. 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.