Skip to content

Commit

Permalink
trace it: Check for unsupported SimulationContext
Browse files Browse the repository at this point in the history
Unless we have implemented #68, display a warning to the user.
  • Loading branch information
LinqLover committed Jul 24, 2022
1 parent bf6c6f2 commit e49fcbd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ trace

| currentBounds label process context oldInspectors traceDebugger window postBuild |
self okToChange ifFalse: [^ self changed: #flash].
"Check for unsupported SimulationContext (#68)"
context := self selectedContext.
((context isMemberOf: Context) not ==>
[| semanticsDisplay |
semanticsDisplay := context isSimulatorContext
ifTrue: [context simulator]
ifFalse: [context].
Project uiManager confirm: ('The debugged process has custom execution semantics that cannot be maintained during tracing:\\{1}\\Trace it anyway?' withCRs asText format: {semanticsDisplay asString tdbAsTextWithAttribute: (TextIndent tabs: 1)}) title: 'Trace It'])
ifFalse: [^ self].

"Save current state"
self containingWindow in: [:oldWindow |
Expand All @@ -12,7 +21,6 @@ trace
"Close first because MVC fiddles around with processes."
process := self interruptedProcess.
interruptedProcess := nil. "Before delete, so release doesn't terminate it"
context := self selectedContext.
oldInspectors := #(receiverInspector contextVariablesInspector)
collect: [:path | path -> (path value: self)]
as: Dictionary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"instance" : {
"bench:for:" : "ct 3/12/2022 17:20",
"customButtonSpecs" : "ct 5/11/2022 12:05",
"trace" : "ct 3/19/2022 20:18" } }
"trace" : "ct 7/24/2022 22:35" } }

0 comments on commit e49fcbd

Please # to comment.