Writing a custom eclipse debugger

前端 未结 3 930
猫巷女王i
猫巷女王i 2021-02-05 15:44

EDIT: There must be some way I can approach this without writing a whole new debugger. I\'m currently looking into ways to build on top of the existing java deb

3条回答
  •  醉梦人生
    2021-02-05 16:25

    having worked on the eclipse edc debugger, it sounds like writing a whole debugger is not so much what you want.

    it sounds like while running the debugger, you will have access to the objects that have the variables and scopes you are interested in.

    you can use toString() in the classes themselves or use detail formatters to display a variation on the information you want. the toString() call can get quite detailed and nest into calls, show whole arrays, etc. detail formatters can also be quite complex.

    see http://www.robertwloch.net/2012/01/eclipse-tips-tricks-detail-formatter/ . it's the best of several URLs (i have no association with the author).

    once you are happy with the output of the Variable and Scope objects, you should be able to add watch expressions that will always show them in your expressions window (thus you don't have to rely on local variables in the stack frame you may be in).

    this should then give you the list of Variables and Scopes from your framework that you are tracking … hopefully without having to write an entire eclipse debugger plugin to do so.

提交回复
热议问题