2

Is there a Smalltalk equivalent of Inspect tool that is available for Microsoft Windows or something like inspect option available in Web browsers

From what I've researched, Smalltalk allows run-time reflection. I think this is more related to applications developed within the Smalltalk IDE.

I'm looking for an Inspect application for independent smalltalk EXEs.

I tried posting on SuperUser, but tags smalltalk was not available. I thought I might get answers here.

tukan
  • 17,050
  • 1
  • 20
  • 48
Vasantha Ganesh
  • 4,570
  • 3
  • 25
  • 33

2 Answers2

2

Such a tool could be created as a part of the Smalltalk application. However, trying to access objects from the outside without any help from within the Smalltalk system would be challenging because Smalltalk objects change their location very often (potentially, at every garbage collection) and therefore the external tool would need to somehow deduce the new location of the object from some fixed root known to it.

Now, if what you need is for debugging purposes, you could (in theory) halt the execution of the Smalltalk system and look for the object of interest in the object memory, tracing the instance variables as well, etc., resuming the execution of the Smalltalk exe when done. None of this is easy though, and that's why it would be much better if the Smalltalk application offered such a tool as an end-user feature.

Leandro Caniglia
  • 14,495
  • 4
  • 29
  • 51
  • This doesn't answer the question because it does not point to a specific tool and does not support the "in theory" answer with the outline an implementation. It assumes without evidence access to the development environment. – ben rudgers Sep 08 '18 at 13:56
  • @benrudgers, thanks for you comment. Why do you think that my answer assumes access to the dev. environment? Note that the second paragraph refers to the use of some machine code debugger, not to the Smalltalk debugger. Also, in that context "halt" means a machine code breakpoint, and not the `#halt` Smalltalk message. – Leandro Caniglia Sep 09 '18 at 09:48
  • "Use a machine code debugger" is a theoretical answer to every programming problem on StackOverflow. Without an outline implementation, the theoretical solution lives in Turing's tarpit. The rest of the answer requires access to the development environment and does not outline an implementation. – ben rudgers Sep 09 '18 at 14:00
1

Smalltalk is a language specification with many implementations. If available, tools for "external" debugging of Smalltalk applications will be vendor/implementation dependent.

Specific techniques for debugging a Smalltalk application without obvious access to a traditional Smalltalk development environment will vary between Smalltalk implementations. For example all GNU Smalltalk debugging is done without a Smalltalk IDE.1 There have been (are?) tools for "headless debugging" of Pharo applications. 2

ben rudgers
  • 3,647
  • 2
  • 20
  • 32