Packages are zip archives and can be inspected with regular zip tools. On Windows, you can change the extension from .hxpkg to .hxpkg.zip, then right click and “Extract All”. Alternatively, if you have 7-Zip installed, you can right click on the .hxpkg file and “Open With” 7-Zip directly.
The best way to debug Scripts is to run them independently, outside of the HyperX Script Runner.
To do so, add the following to the bottom of your main Script file (that is, the one containing the Run(application) method used by the HyperX Script Runner), replacing the Database path and Project name with the one you’d like to debug.
if __name__ == "__main__":
with hs.OpenManagedDatabase(r"Path to your Database") as db:
db.SelectProject("Your Project name")
Run(db)
Note
You can now debug this python file with standard python debugging tools.
If you need to debug something about the Package configuration itself, it is best to set up a build process to quickly and easily get a new Package built and into your Package Source. You might use a command like the following:
hxpkg .exe package . -o C:\Temp\HyperXPackages -f
Important
-f will replace the Package file if it already exists. Do NOT replace existing files in shared Package Sources because HyperX users depend on those not changing.
While developing, you may follow a process like:
-
Make a code change (in a code editor).
-
Build Package (in a command line).
-
Force reinstall Package (in HyperX).
-
Test installed capability (in HyperX).
-
Repeat.
Note
You must force-reinstall in step 3 to pick up new changes to the Package because, otherwise, a Package built and placed in a Source does not change unless the version changes.