factoriomod-debug 2.0.13 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1025 -1007
- package/dist/chunk-W6FPGVXO.js +74 -0
- package/dist/fmtk-cli.js +56 -93
- package/dist/fmtk-vscode.js +31 -15
- package/package.json +781 -1078
- package/readme.md +2 -3
- package/schema/datainfo.json +5 -1
- package/schema/modinfo.json +2 -2
- package/dist/Flamegraph.css +0 -2
- package/dist/Flamegraph.js +0 -2
- package/dist/chunk-S7WJEOJD.js +0 -149
- package/doc/debugadapter.md +0 -16
- package/doc/debugapi.md +0 -41
- package/doc/profile.md +0 -9
package/doc/debugadapter.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Debug Adapter
|
|
2
|
-
|
|
3
|
-
## Runtime Lua Diagnostics
|
|
4
|
-
|
|
5
|
-
The debugger also injects runtime diagnostics into all hooked mods:
|
|
6
|
-
|
|
7
|
-
* Event Handler Replacement: A warning will be issued when an event handler is registered to an event that already has a handler that is not equal to the new one.
|
|
8
|
-
|
|
9
|
-
## Debugging inside Zip Files
|
|
10
|
-
|
|
11
|
-
If [Zip File Explorer](https://marketplace.visualstudio.com/items?itemName=slevesque.vscode-zipexplorer) is also installed, breakpoints and stepping will work inside zipped mods.
|
|
12
|
-
|
|
13
|
-
## Advanced Features
|
|
14
|
-
|
|
15
|
-
* [Debugger Mod API](debugapi.md)
|
|
16
|
-
* [Custom Debug Views](variables.md)
|
package/doc/debugapi.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Debugger API
|
|
2
|
-
|
|
3
|
-
## Detecting Debugging
|
|
4
|
-
|
|
5
|
-
Mods may detect that the debugger is attached by the presence of the global variable `__DebugAdapter`. Mods **MUST NOT** create this variable themselves, or write to any fields within it.
|
|
6
|
-
|
|
7
|
-
## String Interpolation
|
|
8
|
-
|
|
9
|
-
Several locations in the interface use string interpolation with expressions in `{}`. The inner expression is evaluated as lua code. `{[}` and `{]}` can be used to emit literal `{` and `}`.
|
|
10
|
-
|
|
11
|
-
When used with Logpoint expressions, exception strings, and `__DebugAdapter.print()`, the inner expression has access to all locals and upvalues at the current location, and the expression `{...}` will represent the varargs available at that location, if available.
|
|
12
|
-
|
|
13
|
-
The expression always has access to globals.
|
|
14
|
-
|
|
15
|
-
## Debug Print
|
|
16
|
-
|
|
17
|
-
The function `__DebugAdapter.print(expr,alsoLookIn)` can be used to print messages using string interpolation to the vscode debug console. An indexable object `alsoLookIn` may provide additional values for the expressions in the string, which will be used before other variables.
|
|
18
|
-
|
|
19
|
-
## Manual Breakpoints
|
|
20
|
-
|
|
21
|
-
If normal breakpoints are unusable for some reason, you can call `__DebugAdapter.breakpoint(mesg:LocalisedString)` to break. If `mesg` is specified, it is displayed in the editor like an exception.
|
|
22
|
-
|
|
23
|
-
## Terminate Session
|
|
24
|
-
|
|
25
|
-
`__DebugAdapter.terminate()` can be used to terminate a debug session from mod code.
|
|
26
|
-
|
|
27
|
-
## Restart Session
|
|
28
|
-
|
|
29
|
-
`__DebugAdapter.restart()` can be used to restart a debug session from mod code.
|
|
30
|
-
|
|
31
|
-
## Simulate Events
|
|
32
|
-
|
|
33
|
-
`__DebugAdapter.raise_event(event:defines.events|number|string,data:EventData,modname:string)` can be used to call event handlers directly for testing. `data` is not validated, so you must ensure it is a well-formed event payload for `event` yourself. All event and custom-input handlers are raisable, even those not raisable through `script`.
|
|
34
|
-
|
|
35
|
-
## Ignore Functions in Stepping
|
|
36
|
-
|
|
37
|
-
Functions can be excluded from stepping with `__DebugAdapter.stepIgnore(funcOrTable)`.
|
|
38
|
-
|
|
39
|
-
## Disable dumping for large files
|
|
40
|
-
|
|
41
|
-
files can be excluded from dumping with `__DebugAdapter.dumpIgnore(nameOrNames)`. These must be exact source names, e.g. `"@__modname__/file.lua"`. This will disable disassembly, breakpoint validation, and possibly other future features in these files. This may be appropriate if you are experiencing long hangs on `require`s of large (5+MB) data files.
|
package/doc/profile.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Profiling
|
|
2
|
-
|
|
3
|
-
Setting `"hookMode": "profile"` in your launch config to enables profiling. This mode does not provide debug feaures (stepping, inspection, etc), but instead provides inline timing/hitcount data for every line and function executed in control stage. Flamegraph, highlighting and rulers are also provided to assist in finding hotspots. Mods may recognize the this mode by the presence of the global variable `__Profiler`. Mods **MUST NOT** create this variable themselves, or write to any fields within it.
|
|
4
|
-
|
|
5
|
-
The profiler also provides a remote inteface `profiler` with the following functions:
|
|
6
|
-
|
|
7
|
-
* `dump()` - dump all timers immediately
|
|
8
|
-
* `slow()` - return to slow-start mode (dumping on return from every event temporarily)
|
|
9
|
-
* `save(name)` - return to slow-start mode and trigger an autosave with the given name. Defaults to "profiler" if unspecified.
|