Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Debugging in Delphi - how to move current line of Execution back.

Posted on 2009-04-26
5
Medium Priority
?
739 Views
Last Modified: 2013-12-12
Hi there,
I would like to know how to shift the current line of execution back to the previous line.
Sort of rewinding the debugging.
In Visual Studio it is possible by just dragging the arrow next tot he current line of execution back up the code. But i don't know how to do this in Delphi 6.
cheers
Myles
0
Comment
Question by:myleseven
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:MerijnB
ID: 24239479
This is not possible. I know you can do this in VB since it's not actually compiled, if it's possible in modern VS languages (.net) it's probably because it's managed code.

Anyways, not possible in Delphi.
0
 
LVL 7

Accepted Solution

by:
ahalya earned 500 total points
ID: 24241239
IT IS POSSIBLE.  (at least since Delphi 7).

All Delphi Versions:
You open your CPU Window, and scroll back to the current line, and set the "Instruction Pointer" (EIP) to that line. Right-click in the dis-assembly pane, and select the item is near the bottom of the menu called "Set New IP" (or something similar depending on your version).

Delphi 2007 and after:
Right-click on the source, select Debug -> Set Next statement.  (simplifies the process w/o going through the CPU window)


But, keep in mind, you variable state will not revert back to original values. You're simply adjusting the execution point.
0
 
LVL 19

Expert Comment

by:MerijnB
ID: 24242182
That's cool to know, I'll try it out once. It's always a good day if you learn something new!
0
 

Author Comment

by:myleseven
ID: 24246186
Thanks Ahalya that is exactly what I wanted.
Cheers
Myles
0
 

Author Comment

by:myleseven
ID: 24246188
BTW I am running Delphi 6 and it works.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Choosing the right mix of apps is very much necessary for CPAs for making the most of the latest technology through which they can boost their growth.
In this tutorial, we’re going to learn how to convert Youtube to mp3 for Free. We'll show you how easy it is to make an mp3 from your video clips so that you can enjoy them offline.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question