05-09-2017 05:55 AM - edited 03-01-2019 03:47 AM
05-09-2017 05:55 AM
It doesn’t solve everything but I find using iPython together with the Maagic API helps in troubleshooting many issues.
Take a look at the NCS pycli repo: https://wwwin-github.cisco.com/nsopl/ncs_pycli
Hope that helps,
05-09-2017 05:56 AM
I couldn't find perfect way when I had tried ago. I want to know if there is a way.
Just FYI,
a.) pydev
It is the way to debug python interpreter using Eclipse.
There are the way to (1)attach to local process and (2)launch debug server.
Bad:
- (1) can not debug remote server process.
- (2) must modify service code. (pydevd.settrace())
- (2) can not use on Cisco Laptop due to security issue. It fails to create server socket.
b.) PyCharm(IntelliJ IDEA)
PyCharm has the feature which attach to remote process in addition to pydev.
Bad:
- The feature is a charge.
After all, I am debugging using Docker Integration at IntelliJ(PyCharm) on only local environment.
05-09-2017 05:56 AM
Hi,
See: http://www.pydev.org/manual_adv_interactive_console.html
You just need to create your code in a script and then move it into the service package.
05-09-2017 05:56 AM
Hi , experts
Great thanks for your help.
After all the measures, I found PyCharm remote-debugging is an effective way to set breakpoints.
Details : https://www.jetbrains.com/help/pycharm/2016.1/remote-debugging.html#6
04-09-2018 12:11 AM
Hi, Experts
Is there any step by step to achieve remote-debugging ? I tried setting up with PyChram (professional) - didn't went well.
Where do I need to keep python-debug packages in the NSO project ? i.e pycharm-debug.egg One
An alternative way to install was pip install pydevd, but stuck at "IPython" as a interpreter for this project..
I am following "Rhino Python remote debugging with PyCharm - YouTube", Please add any document or links available.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: