Set a breakpoint at a given line number in Adobe's FDB?

663 Views Asked by At

I'm learning the Flex command-line debugger, and I haven't been able to find information on this particular use case.

I'd like to add a breakpoint to a specific line in one of my class files. I can add breakpoints at the start of a function in a class, but I can't figure out how to set it at a specific line (e.g. line 117 in Foo.as)?

When I try to set one for a file on a given line, I get one at a different location:

(fdb) break Foo 111

Breakpoint 1 at 0x######: file Foo.as, line 115

I've verified the line # I'm specifying is valid, so I don't think the FDB is trying to compensate.

Am I doing something wrong? Is this possible in FDB?

1

There are 1 best solutions below

0
On BEST ANSWER

Abso-lutely,

check out the help in fdb, it's fairly helpful :). Just type help or type help then a command. help break gives the output below, lots of nice ways to hook in there, the syntax your using is just missing a colon in between the class and the line number specified, just tried with an MXML file and it worked fine.

Set breakpoint at specified line or function.
Examples:
  break 87
    Sets a breakpoint at line 87 of the current file.
  break myapp.mxml:56
    Sets a breakpoint at line 56 of myapp.mxml.
  break #3:29
    Sets a breakpoint at line 29 of file #3.
  break doThis
    Sets a breakpoint at function doThis() in the current file.
  break myapp.mxml:doThat
    Sets a breakpoint at function doThat() in file myapp.mxml.
  break #3:doOther
    Sets a breakpoint at function doOther() in file #3.
  break
   Sets a breakpoint at the current execution address in the
   current stack frame. This is useful for breaking on return
   to a stack frame.
To see file names and numbers, do 'info sources' or 'info files'.
To see function names, do 'info functions'.
Abbreviated file names and function names are accepted if unambiguous.
If line number is specified, break at start of code for that line.
If function is specified, break at start of code for that function.
See 'commands' and 'condition' for further breakpoint control.