dalehenrich/tode

DNU in TDDebugTool for remote debugging

dassi opened this issue · 2 comments

dassi commented

[ self topez todeEnvironment evaluate: aGemToGemAnnouncement signalMessage ]

self topez is not available on the class side of TDDebugTool. Remote breakpoints from tODE into a Seaside gem do not work, since a DNU is thrown.

@dassi, it looks like you might be able to get away with the following implementation (eliminating the topez call):

setOrClearBreakpoint: aGemToGemAnnouncement
  "Session received a Gem to Gem signal"

  [ aGemToGemAnnouncement signalMessage evaluate ]
    on: Error
    do: [ :ex | 
      | stdout |
      (ObjectLogEntry
        error:
          'ERROR during: ' , aGemToGemAnnouncement signalMessage printString
        object: ex) addToLog.	"Cannot count on being in a transaction when exception is signalled, so dump info to stdout"
      stdout := GsFile stdoutServer.
      stdout
        nextPutAll:
          '----------- Remote Breakpoint ERROR Encountered: '
            , DateAndTime now printString.
      stdout cr.
      stdout nextPutAll: ex description.
      stdout cr.
      stdout nextPutAll: (GsProcess stackReportToLevel: 300).
      stdout nextPutAll: '-----------'.
      stdout cr.
      stdout close ]

I probably don't have a test case for remote debugging and when I added the execution environments(4bc77aa), I imagine I broke remote debugging by accident ... Could you give this patch a try and either submit a PR or let me know that the patch works and I'll do the PR myself.

Thanks for the report!

dassi commented