jas:breakpoints
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
jas:breakpoints [2010/01/04 20:23] – jwarrior | jas:breakpoints [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Break Points ===== | ||
+ | Break points can be set in Smalltalk methods to force sim execution to stop so that you can see what is going on. | ||
+ | Here are some useful ways to set break points: | ||
+ | < | ||
+ | JwServices currentTime > 23.67 | ||
+ | </ | ||
+ | This break point will stop execution in the method when the sim time is greater than 23.67. | ||
+ | < | ||
+ | bseId = #' | ||
+ | </ | ||
+ | This break point will stop execution in the method when the bseId = the symbol # | ||
+ | |||
+ | You can set a break point on any condition or variable, including method temporary variables, that is ' | ||
+ | <code smalltalk> | ||
+ | someMethod | ||
+ | |||
+ | | flightTime | | ||
+ | |||
+ | flightTime := 0. | ||
+ | bseId = #' | ||
+ | ifTrue: [flightTime := 3] | ||
+ | ^flightTime | ||
+ | </ | ||
+ | You could set a break point on the temporary variable flightTime like this: | ||
+ | < | ||
+ | flightTime = 3 | ||
+ | </ | ||
+ | or | ||
+ | < | ||
+ | on the line ^flightTime to stop execution. | ||
+ | |||
+ | To see what instance variables a method understands, | ||
+ | | ||
+ | {{: |