Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move the Program Counter in Delphi Debugging

In Visual Studio, when you're debugging with breakpoints you can change which line of code will be next to execute by dragging the execution cursor to another line; this lets you skip IF statements and the like.

I was idly wondering if there was a similar feature in Delphi anyone knew about?

I've been having a look around in the CPU window (Delphi 2006) but you only seem to be able to run through the instructions in order, not skip them.

like image 633
Kieran Avatar asked Dec 02 '10 10:12

Kieran


People also ask

How do I debug Delphi code?

Debugging delphi source files You need to go to "project->options->compiler" on this tab you need to check the "use debug DCUs". After that you need to build your project again and you can run your application. From now on breakpoints also stop in Delphi source files.


2 Answers

In Delphi XE you can drag the execution cursor to another line as well. Not in the CPU window, but in the editor itself.

like image 83
Giel Avatar answered Sep 22 '22 20:09

Giel


In CPU View you can right-click and choose "New EIP (Ctrl + N)" to set the instruction pointer.

like image 24
Ville Krumlinde Avatar answered Sep 21 '22 20:09

Ville Krumlinde