-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVerbose Diagnostics.i7x
126 lines (87 loc) · 5.12 KB
/
Verbose Diagnostics.i7x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
Version 1 of Verbose Diagnostics (for Glulx only) by Brady Garvin begins here.
"Additional detail in the messages for runtime problems, programming errors, block value errors, and so on."
"with the support for block value errors courtesy of Esteban Montecristo"
Include Verbose Diagnostics Lite by Brady Garvin.
Include Debug File Parsing by Brady Garvin.
Include Printing according to Kind Names by Brady Garvin.
Use authorial modesty.
Book "Copyright and License"
[Copyright 2013 Brady J. Garvin]
[This extension is released under the Creative Commons Attribution 3.0 Unported License (CC BY 3.0) so that it can qualify as a public Inform extension. See the LICENSE file included in the release for further details.]
Verbose Diagnostics ends here.
---- DOCUMENTATION ----
Chapter: Synopsis
Verbose Diagnostics is a behind-the-scenes extension. We include it and set up
symbolic links for Debug File Parsing, and when the story reports a runtime
problem, it will also print a call stack like
*** Run-time problem P1: Tried to move the chorus (a backdrop) to the stage, which is not a region.
within instead of singing,
within the instead stage rule,
within the generate action rule,
within the main story routine.
to tell us where in the story the failure was detected. Reports for programming
errors and block value errors and many other I6-level runtime problems are
similarly improved.
Details are in the following chapters.
Chapter: Usage
When Verbose Diagnostics is included, all of the known problem messages for
runtime trouble, at the I7 level, at the I6 level, and at the Glk level, are
accompanied by a call stack. These call stacks are printed using phrases from
the extension Call Stack Tracking (which see), and we can customize them by
changing the truth states from Call Stack Tracking in a GRIF setup rule. For
example,
*: A GRIF setup rule:
now the call stack simplification flag is false.
The available flags are:
Table of Call Stack Flags
Flag Default Value Meaning
the original arguments flag false whether functions' original arguments are shown
the temporary named values flag false whether functions' temporary named values are shown
the catch tokens flag false whether catch tokens generated by functions are shown
the call stack simplification flag true whether internal routines are hidden
the call frame numbering flag false whether call frames are numbered
the call stack addresses flag false whether function addresses are shown
If the extension Interactive Debugger is also included, Verbose Diagnostics
forgoes the call stack and instead forces a breakpoint. We can then use all of
the debugger's facilities to diagnose the problem, including the debug command
"examine the call stack".
Chapter: Requirements, Limitations, and Bugs
This version was tested with Inform 6G60. It will probably function on newer
versions, and it may function under slightly older versions, though there is no
guarantee.
Verbose Diagnostics is subject to the caveats for the Glulx Runtime
Instrumentation Framework; see the requirements chapter in its documentation for
the technical details.
Verbose Diagnostics is likewise subject to the caveats for Verbose Diagnostics
Lite; see its documentation's requirements chapter for those technical details.
Section: Regarding bugs
If you encounter a bug, check first on the project website
(https://github.com/i7/i7grip) to see whether a newer version of this extension
is available. If, even using the latest version, the fault remains, please file
a bug report: On the website, choose "Issues" from the toolbar and click on "New
Issue".
I will try to respond quickly, at least with an estimate of when the bug might
be fixed, though sometimes I am away from the internet for a week or two at a
time.
Chapter: Acknowledgements
Verbose Diagnostics was prepared as part of the Glulx Runtime Instrumentation
Project (https://github.com/i7/i7grip). For this first edition of the project,
special thanks go to these people, in chronological order:
- Graham Nelson, Emily Short, and others, not only for Inform, but also for the
countless hours the high-quality technical documentation saved me and for the
work that made the Glulx VM possible,
- Andrew Plotkin for the Glulx VM and the Glk library, as well as their clear,
always up-to-date specifications,
- Jacqueline Lott, David Welbourn, and all of the other attendees for Club
Floyd, my first connection to the interactive fiction community,
- Jesse McGrew and Emily Short for getting me involved with Inform 7,
- all of the Inform 7 developers for their hard work, the ceaseless flow of
improvements, and their willingness to take me on as a collaborator,
- Ron Newcomb and Esteban Montecristo for the idea to write Call Stack Tracking
and Verbose Diagnostics,
- Roger Carbol, Jesse McGrew, Michael Martin, Dan Shiovitz, Johnny Rivera, and
everyone else for their helpful comments on ifMUD's I6 and I7 channels,
- Esteban Montecristo, for invaluable alpha testing,
- and all of the beta testers who are reading this.
For Verbose Diagnostics in particular, I am grateful to Esteban Montecristo for
contributing the original code for block value errors.