cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
973
Views
0
Helpful
5
Replies

Any good ways to debug python packages ?

previousqna
Level 5
Level 5

Hi , experts

 

 

Any good ways to debug python packages ?  Except log files , if we can debug python packages use eclipse just like java packages ?

 

If possible , how to run python-vm with eclipse ?

 

 

Have a nice day !


 

 

5 Replies 5

previousqna
Level 5
Level 5

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,

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.

 

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.

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

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.


Getting Started

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: