Hello,
I would like to extend the debugger with some context-dependent information. I am playing with metalinks and I would like to show, in the debugger, some information if my metalinks are in the selected method. This means that: - I need to add a new presentation in the debugger next to the "variable" and "evaluator" ones. - I need to filter that presentation to show it depending on which method is selected. I tried to extend ProtoObject with a method like: gtDebuggerExpressionMachinViewIn: composite <gtDebuggerPresentationOrder: 21> composite text title: 'My machin'; display: [ :browser :debugger | debugger asString] However, this did not add a presentation in the debugger. It only show up when selecting an object in the debugger inspector (see screenshot). How can I extend the debugger as I want? Thanks Thomas and Guille PharoScreenshot.1.png (62K) Download Attachment |
Hi. 2017-05-12 9:53 GMT+02:00 <[hidden email]>: Hello, |
I've looked at it, but I can't get to reproduce it. I have trouble
finding an entry point to start understanding. Quoting Denis Kudriashov <[hidden email]>: > Hi. > > One possibility is to follow BytecodeDebugger approach. Try to look how it > is implemented > > 2017-05-12 9:53 GMT+02:00 <[hidden email]>: > >> Hello, >> >> I would like to extend the debugger with some context-dependent >> information. >> I am playing with metalinks and I would like to show, in the debugger, >> some information if my metalinks are in the selected method. >> This means that: >> - I need to add a new presentation in the debugger next to the "variable" >> and "evaluator" ones. >> - I need to filter that presentation to show it depending on which method >> is selected. >> >> I tried to extend ProtoObject with a method like: >> >> gtDebuggerExpressionMachinViewIn: composite >> <gtDebuggerPresentationOrder: 21> >> >> composite text >> title: 'My machin'; >> display: [ :browser :debugger | debugger asString] >> >> However, this did not add a presentation in the debugger. It only show up >> when selecting an object in the debugger inspector (see screenshot). >> >> How can I extend the debugger as I want? >> >> Thanks >> Thomas and Guille >> > |
Yeah, in any case, it is not clear what we should do: - can't we extend the default debugger presentation? - or should we create a new presentation? - maybe we can do both, but then we have the question: is there a criteria to say "if X, extend the default presentation, if Y, create a new one"? - How to do it? We can just copy paste an existing class... but... - Also, what happens if we want to add a tab to **EVERY** debugger presentation next to the evaluate? On Mon, May 15, 2017 at 8:22 AM, <[hidden email]> wrote: I've looked at it, but I can't get to reproduce it. I have trouble finding an entry point to start understanding.
|
In reply to this post by Thomas Dupriez-2
Hi 2017-05-15 8:22 GMT+02:00 <[hidden email]>: I've looked at it, but I can't get to reproduce it. I have trouble finding an entry point to start understanding. Then look what methods are overridden in BytecodeDebugger. |
In reply to this post by Guillermo Polito
Hi, Currently extending the UI of the debugger is not as easy as extending the inspector. (It cannot just be done using annotations) We should work on improving this for Pharo 7. The actual presentations at the bottom are created in GTDebuggerVariablesBrowser>>#compose. To change it in a debugger you need to create a subclass of both GTGenericStackDebugger and GTDebuggerVariablesBrowser and then override the class side method #variablesBrowserClass in the debugger. I see now that GTDebuggerVariablesBrowser >>#compose doesn't really have a hook for adding new tabs so you'll need to completely override it. We should add one. The pragma <gtDebuggerPresentationOrder:> is used for presentations that should only be displayed when inspecting objects in the debugger. Cheers, Andrei On Mon, May 15, 2017 at 9:51 AM, Guillermo Polito <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |