Last active
August 29, 2015 14:18
-
-
Save btgoodwin/69401739c8e508531288 to your computer and use it in GitHub Desktop.
Debug a Python REDHAWK Device on a running domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this case, I'm suggesting using `winpdb` because it should be available to you in the CentOS 6.x EPEL repos (which gets around some issues of what software can be used, where). | |
1) Find the `entrypoint` tag entry in your SPD.XML file, duplicate it | |
2) Comment the original `entrypoint` line | |
3) Edit the new entry to use a shell script instead, e.g.: `<entrypoint>python/debug.sh</entrypoint>` | |
4) Create `python/debug.sh`: | |
#!/bin/bash | |
exec winpdb `dirname $0`/<DeviceName>.py "$@" | |
>**NOTE:** The __dirname $0__ is surrounded in back-ticks. | |
5) Make the `python/debug.sh` executable: `chmod ug+x python/debug.sh`. | |
The next time you launch a Node using that device, winpdb will launch with it. **Don't forget** to "run" the Device as soon as this window launches so that it can register with the DeviceManager. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment