Finding unused (aka “dead”) code in Delphi

后端 未结 8 2160
忘掉有多难
忘掉有多难 2021-01-01 23:51

Are there any tools that can determine if a function/procedure/method/entire class is used?

I\'ve seen tools that can help a knowledgeable developer track down unus

8条回答
  •  旧时难觅i
    2021-01-02 00:13

    Although clumsy and not global, you can examine the source code for the dots in the margin, as shown below. These are lines on which you can set breakpoints because the code hasn't been deadcode eliminated.

    This happens, I believe, at the procedure level. I don't know a way to determine this at a less coarse level.

    alt text

提交回复
热议问题