Skip to content

Commit fe8de15

Browse files
author
dupriezt
committed
Added UI-less debugger for Sindarin, to be recognised by DebuggerSelector
1 parent a9b6343 commit fe8de15

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Class {
2+
#name : #SindarinUILessDebugger,
3+
#superclass : #Object,
4+
#category : #Sindarin
5+
}
6+
7+
{ #category : #'debugger declaration' }
8+
SindarinUILessDebugger class >> iAmADebugger [
9+
"Leave blank for intermediate classes. Add the <iAmADebugger> pragma for concrete debugger classes. This pragma is used by the system to find all available debuggers"
10+
<iAmADebugger>
11+
]
12+
13+
{ #category : #'debugger declaration' }
14+
SindarinUILessDebugger class >> openOn: aDebugSession withFullView: aBool andNotification: aString [
15+
"This method will be called to open this debugger on a given debug session (i.e. execution to debug). If this debugger wants to keep the debug session (and its process) alive (for example because it is a graphical debugger that would break if the debug session is terminated while its window is open), it should call #keepAlive: on @aDebugSession, passing itself as argument.
16+
The contract is that if a debugger calls #keepAlive:, it should also call #stopKeepingAlive: on @aDebugSession when it closes (passing itself as argument again).
17+
The debug session will automatically not be kept alive by this debugger anymore if this debugger gets garbage collected (and DebugSession will only hold a weak reference to this debugger, so it will not prevent its garbage collection)"
18+
aDebugSession keepAlive: self.
19+
Smalltalk tools inspector openOn: (SindarinDebugger attachTo: aDebugSession)
20+
]
21+
22+
{ #category : #'debugger declaration' }
23+
SindarinUILessDebugger class >> rankDebugSession: aDebugSession [
24+
"Returns an integer representing how much this debugger is suitable to debug @aDebugSession. The higher the integer returned, the more suitable this debugger is. Signal the DebugSessionCannotBeOpenedByThisDebugger exception if this debugger absolutely cannot debug @aDebugSession (for example if this debugger can only handle debug sessions from test executions, and @aDebugSession does not come from a test execution)"
25+
^ 25
26+
]

0 commit comments

Comments
 (0)