5 ms·
"Imagine"... I've been doing it in Visual Studio for years. Step 1. Find problematic code Step 2. Step back to before problematic statement Step 3. Change pr
by rjbwork 11y ago
"Imagine"... I've been doing it in Visual Studio for years.
Step 1. Find problematic code
Step 2. Step back to before problematic statement
Step 3. Change problematic data value and/or code to hypothesized good one (while debugger is active and paused)
Step 4. Continue execution and observe if output is as desired
Step 5. Write test case.
Easy peasy. I'm glad to see the Rust community doing something similar, as the benefits of ease of development are not to be discounted, and Rust seems like a pretty nifty language.
- devit 11y agoThat seems to describe memory editing plus "edit and continue", which is distinct from record&replay and reverse execution. Also, rr has nothing to do with Rust in particular, although this article shows how to use it with Rust.
- ZenoArrow 11y ago> "That seems to describe memory editing plus "edit and continue", which is distinct from record&replay and reverse execution." Sounds more like IntelliTrace to me (if you're not familiar with it, it's worth mentioning it's only available in Visual Studio Ultimate). https://msdn.microsoft.com/en-us/library/dd572114.aspx https://msdn.microsoft.com/en-us/library/dd572114.aspx
- rjbwork 11y agoStep 2 was explicitly stepping backwards i thought. The rest was just a continuation of what the ability gives you and what I often do after stepping backwards to observe the execution.
- spott 11y agorr works for C++/C code too?
- doublec 11y agoYes.
- nhaehnle 11y agoTo expand on the monosyllabic sibling answer, rr is completely language agnostic because it works at the level of machine code, (ab)using platform features like performance counters to do its thing. It should basically work for every x86 and x86-64 program you can debug with gdb, no matter which language(s) it was compiled with.
- dbaupp 11y agoYeah, for sure; as I say in "Removing the rose-coloured glasses", rr is definitely not the first tool to do this, it's just the first one I've been lucky enough to use. I've not done much development on Windows, so haven't had an opportunity to use/enjoy Visual Studio. Also, I'm sure there's a large chunk of people like me, who don't use debuggers much and have no idea what a good one is capable of.
- pjc50 11y agoThis sounds exciting so I thought I'd look it up: http://stackoverflow.com/questions/26431737/can-i-get-reverse-debugging-functionality-for-visual-studio-2013-professional http://stackoverflow.com/questions/26431737/can-i-get-revers... "Visual Studio (2010, 2012, 2013 Ultimate only .. does not support C++" :(
- interdrift 11y agoToo bad this sometimes moves your focus from the problem you are solving and makes you an output matching machine.
- rjbwork 11y agoHAH! True, but it's just one tool in a vast array of problem solving tools.