1

I want to debug some globally installed packages, both in Python as well as Node. I checked my environment variables in windows as well as on ubuntu, but could not find them declared in the environment variables.
Firstly, how do I find their locations.
Secondly, how do I know which file is executed when I call some globally declared package. e.g:
For Node:

grunt someFile.js 

For Python:

syntribos someFiles.conf  
CoderX
  • 942
  • 1
  • 10
  • 30
  • If you are using nvm then this is the path `/home/arpit/.nvm/versions/node/v8.9.3/lib/node_modules`. Browse acccordingly on your system – Arpit Solanki Mar 15 '18 at 07:51
  • Seems like a duplicate of https://stackoverflow.com/questions/5926672/where-does-npm-install-packages – bumblebeen Mar 15 '18 at 08:20

1 Answers1

1

I have found some answer for Python:
First check where the global packages are installed:
Command:

python -m site --user-site 

Output:

/home/ubuntu/.local/lib/python2.7/site-packages

Go to this directory and find the package you are looking for.
Thereafter, we can use:
pip show -f package_name
This will show us some thing as follows:

Entry-points:
  [console_scripts]
  syntribos = syntribos.runner:entry_point
  [oslo.config.opts]
  syntribos.config = syntribos.config:list_opts

Then from here on, we can start debugging our scripts?
e.g: [console_scripts] will be the entry point for the package.

Is it fine? or is there more to it?
And I am still looking for Node.

CoderX
  • 942
  • 1
  • 10
  • 30