Taking the Pain Out of Debugging With Live Programming
angry tapir writes "'Everyone knows that debugging is twice as hard as writing a program in the first place,' Brian Kernighan once wrote (adding: 'So if you're as clever as you can be when you write it, how will you ever debug it?') However, Sean McDirmid, a researcher at Microsoft, has been working to remove some of the pain from debugging. McDirmid, based at Microsoft Research Asia, has been studying ways of implementing usable live programming environments: a solution that is less intrusive than classical debuggers. The idea is to essentially provide a programming environment in which editing of code and the execution of code occur simultaneously — and in the same interface as code editing — with tools to track the state of variables in a more or less live manner."
This will no doubt become an ad hoc, informally-specified, bug-ridden, slow implementation of half of a REPL.
Compiling these two will lead to synergies.
Obvious troll is obvious.
Hah, beautiful.
Well done, love your work!
seriously? Now I admit that Visual Studio is feature rich, only on windows, only with microsoft stacks, and doesn't compile things in a normal fashion (see #pragma) this above comment just oozes microsoft troll...
"'Everyone knows that debugging is twice as hard as writing a program in the first place,' Brian Kernighan once wrote (adding: 'So if you're as clever as you can be when you write it, how will you ever debug it?')
And Stroustroup said, "sounds like weakness! Here, have some templates!"
I've been using this amazing technique for a long time now, IDEs like Eclipse make it fairly easy to do that. TFS doesn't explain what is it that he is doing differently.
You can't handle the truth.
Old pascal compilers had a crude version of this baked right in. You could watch lines of code blink and change color as they ran.
OO makes this kind of idea almost infinitely more complex, however. It was a nice feature for procedural programming, saved me a lot of time.
... this should be in addition to good coding/style standards, proper design, proper source revision control, proper code reviews, and continuous testing/integration. Without any of the former, using this tool does not provide that much information: You first want to know whether your code does what you think it should do, whether it is thread safe, whether it is leaking memory, etc., etc., etc.
Support a Europe-related section on Slashdot!
Forget that, will this be reinventing, dunno, "MFC .NET", where software is effortlessly implemented, tested, and documented using a mix of object classes, C++ templates, custom extensions to C++ that break portability, "wizard" (i.e. obscure template) generated code, a virtual machine, and calls between "managed code" on the virtual machine and native code that break security and prompt stern security scoldings when your code is on a virtual drive or "network share"?
Have you tried the new VS2012? They took a shotgun to the UI and the file menu is still screaming from the trauma.
Prograph did this in the early 1990s. Way to innovate, Microsoft!
and it wants Smalltalk back.
https://en.wikipedia.org/wiki/Smalltalk#Image-based_persistence
seriously? Now I admit that Visual Studio is feature rich, only on windows, only with microsoft stacks, and doesn't compile things in a normal fashion (see #pragma) this above comment just oozes microsoft troll...
It's a troll alright, pretending to be over-the-top-Microsoft shill and still getting some Slashdotters riled up, even though this has been going on for a long while and obvious troll is obvious.
They've reinvented Smalltalk. Let's party like it's 1980.
Though not quite the same I like an IDE (like Eclipse) for Live Syntax Checking. What makes it better than a text editor is that It can check syntax on the fly, and remove some of the edit/compile/broken-compile/swear/re-edit/recompile loop.
No, it's not as cool as potential Live Running, but it helps a lot to keep your mind on code flow rather than language syntax.
So, it's a spreadsheet, basically? It isn't a bad idea at all.
Visual Studio is by far the best debugger in the industry, and one of the reasons I've decided to stay out of Windows development from now on. It attracts crowds of people who rely extensively on code wizards and the debugger for all phases of development including initial coding, and if you're on that team you'll be stuck maintaining their code.
Torvalds has said some characteristically blunt words on the subject of relying on the debugger for development (not Visual Studio per se). I don't think I'd go that far.
Apparently you're a troll? A weird one, because I kind of agree with you (except about Express: yes, it's free, but it's also so limited as to be basically crap.) VS *is* really the greatest IDE I've ever used. It's not perfect, but it is the best I've used. I obviously have not used every IDE ever, and I will also admit that it's much better at debugging .net code than unmanaged c++ code, but still. Microsoft has pushed a lot of crappy, worthless software, but VS 2008 was quality, and 2010 even better (apart from a couple minor UI mistakes, easily fixable with free extensions). Notably, at least far as the summary went, it's done everything this guy is claiming he invented, since basically forever. (Though I personally leave the "recompile on the fly" option turned off; I think it's more trouble than it's worth.)
VIM editing Perl code in one window, another for an execution trace, and a third to run the program. Ugly and basic but it gets the job done.
OK. I've yet to find a better overall environment (though Eclipse + Java beats VS in some aspects of debugging, neither seems better at every aspect). However, I don't see the point of your post. In reality "care" would have been implementing this YEARS ago. I mean, I've used Python for a long time, and all I can think is "I have this in Python. WTF is novel or research about this? Just %$#@ing do it.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
All in all, Microsoft Visual Studio keeps getting better!
Yea, but its from Microsoft.
how would it integrate data/network/user input?
how does it know when to start live testing, as pieces of interdependent code are being written?
My God can beat up your God. Just kidding...don't take offense. I know there's no God.
You must be very unbiased guy in general. No MS partisanship, whatsoever.
While I agree that the MS Visual Studio is a good IDE over all, there are better alternatives out there. The first real problem with it is that it's single-platform. You can't use it anywhere.
The extensibility is a bitch in VS. It takes too much time and effort to figure out it's API, and it's quirks. Not to mention the support for these retarded languages that VS supports, apart from C++ and C#. That is the only two that worth even to look at.
The debugger is great... except that the whole IDE is based around their own debugger, and you making a debugging interface in VS takes more time than any other IDE out there.
Visual Studio also very rigid on your project structure, and if you don't subscribe to their project file model, you are basically screwed.
Not to mention, that Visual Studio is a resource hog only running on very beefy configuration. Oh, and don't get me started with the useless packages that installs on your system for no apparent reason. Finally, if you want to do refactoring, you have to purchase an external tools, like VAX.
So, while it has some good features for which MS deserves a candy, overall it isn't that good, no need for jumping up and down like a puppy dog.
"a programming environment in which editing of code and the execution of code occur simultaneously" is commonly called an interpreter, welcome to 1975
Just because you're paranoid doesn't mean they aren't out to get you
For I have been looking for one, lo, these past 27 years.
We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
I do not code or develop code any more, but I'm great for finding bugs in code which irks my developers to no end. But conversely, they really like when I test their code, especially when they want to have bugs found. I know how to recall what I did when creating my bug report. I almost never report something as a bug until I can repeat the issue and then I usually re-create the issue two more times to ensure I recall just how I got to that bugged state. I document step by step instructions and follow it up with screen shots. If weird occurrences are also observed, I note those as well. I also try to note down what version of software I am running, because that also helps to narrow down an issue.
While all of the info I provide doesn't always help in debugging all code, it certainly simplifies the process by the developer to figure out what's wrong and where it's taking place. In essence, my good testing and regurgitation of information help cut down debugging efforts by a large percent.
God knows it's better than "I clicked a button and the program blew up".
Life takes interesting turns, but the most interest is when you're off the beaten path.
While I'm writing code is the easiest time to think about how it might misbehave.
I put in debugging in the form of asserts.
Debugging often consists of just making a strongly typed, picky compiler happy and then clearing the asserts.
Sometimes it takes a week or so before there is enough surrounding code to actually debug anything.
Without the asserts, I have get back to the frame of mind I had early in the week.
With the asserts, I don't.
As a bonus, the asserts are still around for regression testing for later code mods.
The model they propose (simultaneous coding and debugging) doesn't work until you have a 'quorum' of code to do incremental improvements on.
If you want to stop an spend a week restructuring, same story.
But for incremental improvements, sounds great.
Again, you are in the best possible frame of mind to think about how code can misbehave while you are writing it.
Very nice, but its usefulness is really limited to functions where the parameters are simple objects or native types. Complex objects would require too much initialization to make the unit test worthy.
Here's what would be more useful for anyone out there working on debuggers to consider:
Typical step debugging has a really pathetic interface with the following interface:
- break
- step
- step over
- step out
- resume
I've been using that now for 20 years. What would be nice would be to add the following:
A resume with a reduced speed option. In other words, start stepping with a slight delay, with visual feedback, so the developer can see the code as it is stepped through. Allow the developer to control the speed of the stepping (mouse-wheel or some dial) as well as dynamically prompt the debugger to step out (climb back up the stack) when the debugger gets too far down into weeds.
Replay. Vmware is making this happen with their tools, but it would be nice if this were more ubiquitous. The developer should be able to start "recording", and every memory/register change from then on is tracked, such that the developer can rewind instead of only being able to move forward.
And for anyone working on language development, my 20 years experience has shown that the null-pointer exception is the most common problem that people run into. It would be nice if coding languages enforced natively the concept of a object reference/pointer parameter not being null at compile time. The C/C++ reference (&) comes close, but you can still circumvent it by simply de-referencing the pointer. You can get around this with templates/generics/etc but it is a hassle.
Please implement.
Thanks
Fred Brooks noted this one years ago, and it's still true: The reason programming is complicated is frequently because the real-world problem you're trying to model in software is complicated. The reason debugging is even more complicated is that not only do you need to understand what you're trying to model, you also need to understand exactly how the existing software modeled the real-world problem.
I am officially gone from
At first glance, I just want to say, "Hey, Basic Interpreter from the 70's, you're finally getting some respect!"
But there are some deep issues that are, even with these techniques, going to be very hard to debug:
1) Large I/O situations -- real time data collection and display. Weather reporting, gaming, etc. How is debugging on the GPU going to be helped by this, would be one of my first questions.
2) Networked, distributed code -- with clients on multiple platforms (CPU, browser, Java version, etc.), and clustered virtual servers, where do you debug? Just locating which side is in error (wrong message being sent, wrong message being heard, wrong result being stored/displayed) is a challenge, and real-time transactions (for instance, race conditions on a resource that could be anything from an interrupt bit to a piano in inventory) further complicate this.
If they ever come up with a debugger that will let me hook into both the client and the server at the same time, that would be brilliant.
Design for Use, not Construction!
Cool, I knew this would make a comeback from the 60s or something.
I want to play Free Market with a drowning Libertarian.
From my understanding, I thought that was exactly the purpose of #pragma - nonstandard stuff.
As for windows-only stacks... That's BS, at least for .NET.
However, yeah, the compiler is stuck to Windows, and their C++ interpretation (not including pragmas, which are for non-standards), is... at best "wonky"
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Compiling these two will lead to synergies.
Obvious troll is obvious.
Do you mean shill? If so I agree.
You must have closed your eyes and plugged your ears at the shotgun. I admit it was pretty gruesome. However, after wards they brought out the chainsaw, boiling acid and a couple of fighter jets for good measure... It was horrible.
The sad thing is... They already did that once before to get to the UI that was in 2010... The UI does seem to be getting worse and worse... Just like with their OS and Office products (and it seems, many others to a lesser degree).
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Pretty sure these were features of VB6. I remember hacking out code, using the immediate window to trace values, setting break points, stepping through the code, modifying in the middle of execution, and then resuming execution. The language itself may have had a lot of issues and performance issues, but the IDE and development environment had some very nice features.
The problem is that so many programmers need debuggers in the first place. That is a sign of low competency levels. I found that using methods from design by contract basically eliminate the need for debuggers as they lead to much, much better code and give you errors that are directly meaningful. Of course, this requires thinking about what you want to program before doing so, as you are actually implementing a check of its implementation before you implement the actual code. And it can be done in any language once you have understood the concept. The only time I use a debugger is when diagnosing obscure problems, but that requires a lot of thinking about the state I see anyways, and DDD is perfectly fine for it.
This tool does nothing than making programming seemingly accessible to programmers of even lower skill. Writing code that does what you want is easy, but writing it as simply as possible (maintainability), with clear and clean interfaces, robust, aware of special cases, fast, etc. is not. Hence the only thing this tool will is to decrease code quality overall.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
Heh. That is most certainly not the product most people would go for. And honestly, I'd just as soon go with Professional or Express & use Mercurial to make up the difference.
Ultimate has features you only need if you are in a huge corporation/project setting
A more normal user might go for this ($500)
http://www.amazon.com/Microsoft-Visual-Studio-Pro-2012/dp/B008RW3XIO/ref=sr_1_1?s=software&ie=UTF8&qid=1366038707&sr=1-1&keywords=Visual+Studio+2012
Which, I admit, is a bit high for most, but if you don't need a lot of the code sharing or installer building tools, (and why should you, there's Mercurial for the former, and the latter isn't so hard to roll your own), you can always go for the Express edition, which is free/
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
I just want the ability to detect a fault and then run my entire system backwards to figure out where the problem came in. Wind River Simics can do this, but it's expensive and time-consuming to get a model of your hardware unless it happens to be something they already support. It's also slow to run (as you'd expect).
Hah, this techinque is called PHP+println() and is not new by any means. I programmed PHP live with 50-100 clients ready to kill me if i clicked Ctrl-S a bit too early. Noobs.
Can I light a sig ?
This looks soooo much like the way smalltalk engines where implemented in the 80's it's boring.
One can always count on MS to bring the latest in software innovation
I'm trying to get modded "Interesting Flamebait Informative and Insightful Redundant Troll" *-* Please Help *-*
But the most difficult bugs are not the crashes or randomization introduced by the thread completion order. What is difficult is the bug that happens after several hours of computation. Longer it takes for the bug to manifest itself, harder it is to debug. Of course it is my luck I end up with coding for such products. Not that I am complaining. It needs a special skill have such products humming along, and it takes a long time on the job to develop it. The pay, benefits and job security are good. So I am not threatened ...
BRB
What Bob? Boss wants to see me? Why is she having these gentlemen from security and the HR blond boy with her?
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
Sure you can compile mono code with vs. But it's still a windows stack just ported to *nix. I love mono, don't get me wrong. I also love C# even though I'm a more java guy than anything. But for this guy to oogle over visual studio with such fanboi-ism as to neglect the fact that TFA talks about live programming and how awesome it would be for direct feedback of variables and scope and the like to preach the microsoft kool-aid to us /.'s is ridiculous.
McDirmid notes that there are limitations to his prototype. For example, the approach used by LPX won't work for "interactive programs whose inputs consist of time-ordered events and whose outputs can vary over time
You mean, such as programs which offer a user interface, and which both write to and read from some kind of persistence layer or document storage on the backend?
Well, at least there can't be too many of those....
Koans and fables for the software engineer
What's funny about this article is it's focused on a very limited text based debugging system where the author is already apologizing for bugs while demo'ing it.
It mentions a quote from an Apple guy on the same topic. Wait a minute... Apple is working on this too? So you click the link and find a much better article with a similar system that's way more advanced and live connects the graphics with the code.
Just kind of sad, I RTFA and think "Huh, that's interesting, someday" then check out the link inside the article and find a much more informative and interesting story that I'm still reading. Read THAT article instead. Looking forward to seeing this creep into Xcode updates.
Cwm, fjord-bank glyphs vext quiz
What are the better alternatives?
Honest question, I love VS (inc C# and Linq) but I hate Windows.
It would be great to have something as good as VS for Ubuntu.
My first suggestion would be is for them to implement WinDbg in an actual usable way. The cryptic commands and setting up the directories for the source and .pdb files.....sheesh.
>What are the better alternatives?
Instrumented code.
Unit testing.
Live testing.
Rapid build - test turnaround.
If you're looking for a better debugger, you're doing it wrong.
You need to instrument your code with the features to make it testable from within the running code base.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
The idea is good, but not new : http://vimeo.com/36579366 (Bret Victor's Inventing On Principle)
I used VBA in Excel to put together a small application (basically, some reporting automation with a GUI) for a small company and sold it, with the source code, for $750. Took me about 20 hours of work. Didn't cost me a dime (the Office license was paid for by my employer). Point is: if you can code (not even professionally) and have some sales skills (not even professionally) you can make a pretty good buck off those $500 Visual Studio Pro costs.
Furthermore, there's a pretty large amount of companies who have that, how is it called? Some sort of contract with MS where they pay a monthly fee of 200 USD or something and they get CDs and DVDs with all Microsoft products for free. Or something like that. That's how I got a whole box of licensed MS products (including Visual Studio 2005) from my former employer.
...gis sdrawkcab (usually not responding to ACs; don't bother posting as AC)
From www.lighttable.com: Light Table is a new interactive IDE that lets you modify running programs and embed anything from websites to games. It provides the real time feedback we need to not only answer questions about our code, but to understand how our programs really work.
I agree. While $500 is a bit expensive if you want to use it for coding as a hobby, it's almost inconsequential if you're going to be using it for creating a product to sell. Most coders would probably make that amount of money in a day or two.Even as hobby, it's not that expensive. People spent more on the PS3 on release day. Pick most other hobbies, and it's easy to drop $500 on them.
Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
yeah, the oogling is obviously a troll. I was more commenting on some of the other things.
As for it being a ported Windows stack - I don't care too much about that, as long as it's done in an efficient manner (and I have to give hats off to the Mono team on that one). If it runs, and runs well on Windows, FreeBSD, Linux and Mac, that's all I care about.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Not for sure I agree that debugging is harder than writing code.
Writing GOOD code is hard. Debugging good code is easy.
I've always enjoyed debugging and assuming the code is
decently written, I usually find it fairly easy to track down and
fix a bug.
All in all, Microsoft Visual Studio keeps getting better!
Yea, but its from Microsoft.
This may seem like a funny answer, but you have to remember that most people who program using Microsoft product aren't exposed doing anything outside of Microsoft. It's new to them. Few companies adopted LDAP until it was implemented as ActiveDirectory. Then everyone had to have it.
You intentionally don't use the best tools. You must be a top notch developer!
The idea is to essentially provide a programming environment in which editing of code and the execution of code occur simultaneously — and in the same interface as code editing — with tools to track the state of variables in a more or less live manner."
Not that I'm a Luddite resisting new tools and ideas, but wouldn't a REPL be good enough for most cases? Most of my professional life I worked with separate editing, compiling and debugging sessions, a necessary PITA for the tools at my disposal. But ever since I started using/playing with languages that come with a REPL (Python, Ruby, Scala), it's been like a productivity blessing where one can break portions of the code into (semi)independent, coherent groups of lines that can be tried out again and again and again.
The side effect of this (when I'm a liberty to use a tool with a REPL) is that my code (already designed for testing in mind) becomes even more testable, and firing a full-blown debugger is something I have to do only for very difficult-to-find bugs. I certainly hate when I have to work with an environment (C and Java, which is what I mostly do) without it (even though that is how I've been working most of my professional life).
So I'm wondering what else can one get with the new approach that is substantially better than a REPL-based development environment.
Anybody have an explanation about how this is different than what LLDB and LLVM can do? You can debug running code and modify the executable on the fly already.
I've personally fallen in love with Visual Studio. It's definitely the planets most feature-rich and capable IDE.
How is not being able to load 64-bit libraries, that it compiled, feature rich? I guess I should consider the fact that I can't edit the UI using the same libraries I will deploy a feature. For those that are unaware, the UI designer is still only 32-bit, even though VS has been able to compile 64-bit for a while now. So when you are working on a 64-bit project and want to use the libraries you've written, you 1st have to compile it all to 32-bit, do your edits in 32-bit and then recompile for release as 64-bit.
Or another issue is with manually edited Entity Framework edmx files, which is necessary considering that Entity Framework doesn't natively support all MS-SQL data types and other things that Entity Framework lacks. If you "Update from Database" a manually edited edmx file, goodbye manual changes. But hey, you didn't really mean to manually edit the file, so as a feature VS fix that for you.
Microsoft really cares about programmers and developers and helps all of them write efficient and clean code.
If that were true, they would get a working C99 compiler, one that isn't based on a standard from over 20 years ago. I had to install Cygwin to compile some code over the last few months because it wouldn't compile in Visual Studio.
It's not even that hard, even allowing variables to be declared at any point in the code would be a huge improvement and would be a simple little change. If Microsoft wants to pay me to come do it for them, I'll give them half off.
"First they came for the slanderers and i said nothing."
You're just as trollish as the first guy. 99.9% of people don't need Ultimate with MSDN subscription. But thanks for playing.
The only innovation is the taking money from "training partners" for so profoundly changing everything Micro$oft every few years that every office worker in the world, who uses M$ products, has to go in for training every few years. The training places were going down the tubes because everyone learned windows and office and stuff, and nobody needed training anymore. Anything you didn't use very often you could just Google. (since M$ help is useless) :)
Now that they've changed everything (twice? three times?) not only can you not jump from one version to another without grinding the mental gears but you can't even get an easy answer with a search engine, since there are twelve different ways of doing things and only one works in your situation.
I don't KNOW that they are taking money to deliberately change everything, but it sure makes sense.
If they aren't they need to fire they guy who came up with the idea of changing everything so radically so often... out of a cannon.
Nothing to say here... move along
Didn't Chuck Moore implement this already 20 years ago?
So, now the developer has this great tool that runs on their desktop that helps them debug the program. Now what happens when it fails in the field? Did the developers spend the time to create sufficient tracing/logging functions so that the end user can report the failures?
The largest problem isn't "debugging" during development, its "debugging" post failure analysis of field problems. Its such a large problem that nearly all "software engineering" and related process is focused on moving the debugging aspects to the developers machine, rather than getting the end customer involved.
When I first started writing code, I spent a lot of time in step/trace debuggers. Now I would say its probably less than 1% of my development time. That is for a number of reasons, the least of which is that I can almost always "see" the bugs in the code without having to run it. For code I'm writing, the output is almost always sufficient to find the bug without really having to think about it. That is something I couldn't do 15 years ago.
Good point. We've all heard of "economies of scale", right? Well, there are also "dis-economies of scale." And I don't mean a company is too small -- I mean they're too big. Microsoft should split up.
If VS or Office were spun off into a separate company, they would be free to develop for other platforms. Windows has a monopoly on desktop users but not on developers. Linux and OS X versions of Visual Studio could have respectable sales figures. They're giving up that money (and much more) by being Windows only.
Do you even lift?
These aren't the 'roids you're looking for.
MSDN Ultimate lists for $13,299 on the MSDN website. Once you pay that price, the renewal, which is every 3 years, is only $4,250, so about $1,400/year. Those are list prices. I get Pro at work and the list price is $800 and we only pay $400 every 3 years.
The Ultimate edition also includes 4 support incidents every year, where they will help you with almost any issue. You also get access to unlimited installs of every Microsoft current and past product for testing/development/presentation reasons. You also get unlimited high priority forum help. I have personally gotten quick responses on their forum from Sr developers who gave very detailed answers.
You're not paying for the IDE, you're paying for the awesome support contract.
Lisp has been supporting this for over 3 decades.
So, he's reinvented FORTH 50 years later and using 5000x more lines of code, and FORTH still does it better! ROFLMAO! Ah, Charlie Moore, I doubt you read /. but you will never be dethrowned as the author of the most elegant code ever. Thx!
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
Its 100x better for this than any of the languages you mention, higher performance, generally, and achieves VERY high rates of internal reusability to boot. I literaly wrote 4.5 million lines of fully debugged functioning FORTH code in 5 years. It certainly isn't a FASHIONABLE tool, but its frighteningly effective.
"Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
Oh yes. As a web developer in a small company I occasionally end up doing tech support. It's really fun to troubleshoot a customer's Outlook troubles over the phone while simultaneously googling for information and making wild guesses about where they hid the account settings this time. Then you meet a customer with an ancient copy of Thunderbird and you immediately know where to navigate and what to check.
I will give credit where it's due. Microsoft are very good at IDEs and they make decent peripherals. The NT kernel is respectable, as are NTFS and CIFS. But one thing Microsoft really can't do is make a reasonable user interface or at least stick with what works - cf. their bizarre decision to make the file menu an unlabeled sphere in some variants of the ribbon UI.
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
Live programming has been available for decades and is the common working mode of any Smalltalk programmer. (Or Forth for that matter) Talk about nothing new under the sun. We've wondered why anyone would work any other way, for decades.
Even if you, for some reason, want to use C, I remember Apple demonstrating live debugging years ago at a WWDC. It was pretty cool to watch then fiddle with the code of a running C program and see the changes as they made them. But I've never heard any more about it so I assume it doesn't really get used much. I don't generally debug Python programs that way either, although it's handy sometimes if a particular program takes a long time to start up.
Now I admit that Visual Studio is feature rich
It's like a gulp of water after crawling through a desert for a few day. Meanwhile, though, the Lispers and Smalltalkers with their fully introspective, ridiculously extensible environments are watching you from a neighboring oasis, sipping their palm wine and grinning from ear to ear.
Ezekiel 23:20
It's called innovation. Or so I'm told.
You've been told wrong. Innovation had reputedly been seen for the last time in the wild in the region of Palo Alto, with last sightings sometime around 1980, and then it's been thought to be extinct, until it resurfaced a few years ago at the Viewpoints Research Institute.
Ezekiel 23:20
Weird, I get all of that for free when I develop for Linux, the support I mean. I don't think I've ever gone more than a few hours without getting an answer from someone on a forum or mailing list. Plus I get all that incredible community support without being locked into an MS ecosystem.
Whenever I see the insane prices of MS dev tools I cringe. So many people waste so much money on this crap that it isn't even funny. It's not like software on Windows is of some extra great quality surpassing OS X and Linux or anything.
If you've got bugs that have effects everywhere in your 1 million LOC 3D game no debugger is going to help you.
One of the biggest advantages of live code editing (otherwise known as an interpreter) is that you don't have to rerun the whole thing after every little change. So if the boss at the end of level 143 glitches you get execution to that point, see what happens, try a fix, see if it works, etc., without having to quit the game, restart, and get back to the boss.
You didn't have to install Cygwin for that. You could have just installed the MinGW GCC. You can even set up VS to use the GCC tool suite if you don't want to leave the IDE.
I am becoming gerund, destroyer of verbs.
You intentionally don't use the best tools. You must be a top notch developer!
Tools are useless, if they don't happen to do what you need to do at the moment. The point of programming isn't to obtain a debugger and get to use it. The point is to construct correct programs. There are many approaches to this that have nothing to do with debuggers: TDD, QuickCheck-style testing, fuzzing, correct-by-design approach (somehow unpopular these days - when did programmers get so lazy?). A debugger is very narrow-focused tool. Huh, so you can stop the execution of a program at a single point in time and play with it. Wow, big deal. Can it slice the program? Can it run in reverse? You know, there have been debuggers capable of doing these things.
Ezekiel 23:20
Others have done this trick with C++ code, I don't know why MS couldn't.
It looks like he made one of the more basic pieces of software shown by Bret in this video from a year ago: http://vimeo.com/36579366 Check out his more advanced content creation demo @29:10 in this video.
I didn't say pro was the only option. Express is free and works just as well.
It's called a Site License. And technically, when you leave the company, you are supposed to remove the software (not that anyone does).
Oh, and I'll take VS 2010 express (free, as in beer) over 2005 pro...
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
True, but Mingw is easier to use from Cygwin, at least for me. Either way, it's silly. Visual Studio should update its technology to the last century.
"First they came for the slanderers and i said nothing."
It is expensive as a hobby if you can get Express for free and don't need the features of Pro.
Pro is nice. I have it. But only because there are a couple plugins that don't work well with Express, and I really wanted them.
Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
Meanwhile, though, the Lispers and Smalltalkers with their fully introspective, ridiculously extensible environments are watching you from a neighboring oasis, sipping their palm wine and grinning from ear to ear.
Odd then that almost nobody uses either one.
until it resurfaced a few years ago at the Viewpoints Research Institute.
If that's innovation, I'll take evolution.
Torvalds has said some characteristically blunt words on the subject of relying on the debugger for development (not Visual Studio per se).
That makes me happier than ever that I use one all the time. Torvalds can try and construct a watch without a loupe if he wants. I'm not so stupid.
Odd then that almost nobody uses either one.
It shouldn't surprise you that uneven access to information has been a perennial problem with detrimental effects to many aspects of human societies, including financial markets, job markets...why would anyone think that the technology market is immune to these effects is beyond me. I mean, there are still people who keep using MySQL out of sheer force of habit, even though PostgreSQL is faster, more featureful, has a better license, and is reasonably well known even by people who don't use it.
Ezekiel 23:20
If that's innovation, I'll take evolution.
There's no evolution, it's more like geological sedimentation and lithification. New layers get added on top of the old ones. Evolution would imply changes to existing structures.
Ezekiel 23:20
Again, APL solved this in the 1960s: any crash saved a debug workspace with all state preserved, halted at the point the error was detected. You could cut back the stack and step through to the error (assuming the code was written with sufficient modularity).
I've been working in G2 for most of the past 15 years, and this article describes the strengths of that environment, even 15 years ago. The "inspect" interface is like a troubleshooters wet dream. I don't know why something similar hasn't been in every platform for the last decade.
Uh, yah any unix/windows machine can store core dumps. That gives you one piece of the puzzle, but is rarely sufficient, especially if its an error in processing or whatnot and the system continues to run due to error handling.
Site license, that's it. Well when I left the company I asked them "can I keep these" and they said "yeah sure". Not that they were using them anyway...
...gis sdrawkcab (usually not responding to ACs; don't bother posting as AC)
Ugliest programming environment I've ever seen, and I like using multiple terminal windows with vim, gcc, and gdb running. Everything else I've used seems at worst constructed with no attention to aesthetics; VS2012 looks like there was a positive antipathy to aesthetics.
"When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
don't worry - Microsoft broke "edit and continue" in .NET so it doesn't work at all (in the case of 64-bit code) and doesn't work well the rest of the time, something that was awesome in C++ and VB coding.
..is to avoid bugs when coding. There was a long time, maybe 40 year, since the last "new" type of bug appeared. So you know what type of bugs to avoid. It's just your time and /or lazyness that causes bugs. And, of course, lack of knowledge. Which you should have researched before started coding.
Mundus Vult Decipi
Testing is for finding bugs.
Debugging is for fixing bugs. More precisely, it's a step in the process, explaining why the bug happens.
I use Qt Creator, it is great for C++ development in general. For everything else, I fire up Eclipse. Eclipse has its own issues, as it is written in Java, you can't expect the same performance as from Qt Creator for example, but it has the best plugin collection and perhaps most supportive community. Virtually all existing language is supported by an Eclipse plugin, and the number of existing ones will let you implement your own.
Also, I'm a great admirer of Emacs, which is my primary environment if I do some work remotely. I love to work with it, for C++, script languages, or just simply text editing.
If you're looking for something more similar to Visual Studio, I suggest you should also give a try to KDevelop. There are plenty of alternatives as you can see.
None of those would help you out without a good debugger. I use all of those at work, yet the best combination to find bugs is to get the unit tests in to the debugger. TDD isn't a magic cure, it's just a good method to work in certain cases.
What are you doing with Access for a work? I don't even know where would be it useful at all.
I am right. Its been a lot years, and I don't have VB6 handy but I do have excel and I can write some VBA in it. This should be functionally similar. I can change the content of a variable, and make class, but as soon as I modify the code document execution stops.
Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
Yes. My assertion is that the debugger you need is not better than the ones that are available everywhere.
Instrumented code will assist locating a problem in both a unit and production environment context. The worst bugs are compositional and debuggers really don't help there because the units all work correctly. Instrumented code will help you realize you were stupid when you thought you could put things together that way.
My code constantly reminds me that I'm too stupid to write code.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
While I agree that the MS Visual Studio is a good IDE over all, there are better alternatives out there
Care to suggest a few?
(currently using eclipse for Java/C++ coding, happy but always welcome new suggestions)
OK, I thought you're one of Those Guys... who think that debuggers encourage bad coding practices. My understanding of a good debugger is sort of the ones that are available today. I don't expect debuggers will expand their feature set anyway, they are good as they are. In fact, MS debuggers are in some aspect are inferior as they can't be scripted AFAIK.
Did that below in this thread. My personal favourite is Qt Creator for C++, free, and platform independent, plus better productivity IMHO.
We could call it "Smalltalk-80"!
Most of my code is designing chips. Chip design is a lot less forgiving, errors are permanent. Applying a chip design style verification and validation approach to software development is my personal top tip to the world of software development.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
Have to agree -- if I had points I'd mark you up for Insightful.
Debugging doesn't take alot of though -- sure, if you emulate the code
in your head -- which gets close to the work in designing but the way
most people do it (and I do it for most simple debug tasks).. is fairly low-brain power stuff. Hard problems -- they can be both a bear and
fun -- i.e. they are brain teasers.
As for the statement about being clever up front -- depends on definitions, but usually the more clever I am up front, the less code I need to write -- and there is less to debug. That said, clever up to and past the point of "obscure", ... it's not the debugging that is so hard -- it's trying to figure
out what the heck you were trying to do when you want to enhance or update it. For the most part, even on my own personal projects, I
try to write with long var names, and/or an occasional comment if something is unclear or not str8forward.
But a year or two after the fact in coding -- I look at it, and wonder, did I write this? Only because my coding style changes over time (not formatting, but idiomatic usage).
Also, on a real "project", I'll usually build in a debug framework as I code.
Code has to be able to be examined and testable. So hooks are usually needed.
Yes, UndoDB does indeed do reverse memory watch. As does gdb since 7.0 - the big thing UndoDB buys you is speed: gdb recording slowdown is about 50,000x, whereas UndoDB is usually less than 10x and often under 2x. (I work for Undo Software)