6

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.

Kieran
  • 718
  • 1
  • 16
  • 33

3 Answers3

8

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

Giel
  • 2,066
  • 20
  • 22
  • Just tried and this works in Delphi 2010 as well. I did not know that, thanks. – Ville Krumlinde Dec 02 '10 at 12:02
  • 1
    You can also right-click > Debug > Set Next Statement to do the same thing. That one has been around for ages too. – David Dec 02 '10 at 22:54
  • @DavidM That's also really useful, thanks! I didn't think of looking there; the editor right-click menu has so menu options that my eyes glaze over when I look at it. – Kieran Dec 03 '10 at 16:04
7

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

Ville Krumlinde
  • 7,021
  • 1
  • 33
  • 41
1

In the IDE of 2007 you can also set the execution pointer from the Debug-Contextmenu in the sourcecode. I've tried it a few times, but its very tricky. Don't try to move the pointer outside any begin-end block or it will bite you in the @ss later

Bascy
  • 2,017
  • 1
  • 21
  • 46