I am trying to develop some scripts in Python to run on my FreeNAS box, but the methodology I am using to develop and debug them is not practical.
Here is my setup:
FreeNAS box:
- It has a dataset for my Python scripts.
- The dataset is mounted as a share over SMB.
PC:
- I am using Eclipse with PyDev plug-in.
- The Eclipse workspace is local to my PC but the Python scripts are defined as links to the share.
- SSH session to the FreeNAS box to execute the scripts.
How things work with the above setup:
- I develop the script on Eclipse then save the file on the SMB share.
- I connect to my FreeNAS box over SSH and execute the script using: python my-script.py
Everything is fine thus far, until comes the time for debugging.
With Eclipse running locally on my PC, I can't use its debug capability because the script is run directly within the FreeNAS box.
What are my options:
1) Is it possible to let Eclipse execute the scripts remotely while providing debugging capability?
2) If Eclipse is not able to execute and debug the script remotely over SSH, is there a way to run the script locally on my PC and pass some of the FreeNAS specific commands over SSH within the script itself?
The real issue is to be able to call FreeNAS/ZFS/FreeBSD commands within the script as they have to be run natively on the FreeNAS box.
If none of the above works, what would be my alternatives?
Thanks,
Here is my setup:
FreeNAS box:
- It has a dataset for my Python scripts.
- The dataset is mounted as a share over SMB.
PC:
- I am using Eclipse with PyDev plug-in.
- The Eclipse workspace is local to my PC but the Python scripts are defined as links to the share.
- SSH session to the FreeNAS box to execute the scripts.
How things work with the above setup:
- I develop the script on Eclipse then save the file on the SMB share.
- I connect to my FreeNAS box over SSH and execute the script using: python my-script.py
Everything is fine thus far, until comes the time for debugging.
With Eclipse running locally on my PC, I can't use its debug capability because the script is run directly within the FreeNAS box.
What are my options:
1) Is it possible to let Eclipse execute the scripts remotely while providing debugging capability?
2) If Eclipse is not able to execute and debug the script remotely over SSH, is there a way to run the script locally on my PC and pass some of the FreeNAS specific commands over SSH within the script itself?
The real issue is to be able to call FreeNAS/ZFS/FreeBSD commands within the script as they have to be run natively on the FreeNAS box.
If none of the above works, what would be my alternatives?
Thanks,
Last edited by a moderator: