How to debug the cockpit code on my laptop?


#1

i git clone the cockpit code on github https://github.com/OpenROV/openrov-cockpit/tree/30.0.3,i want to debug it on my ubuntu system.i refer to the guide on https://github.com/OpenROV/openrov-software/tree/master/developer_guide.i have install the npm,nodejs,node inspector,i follow the steps here:
1:npm install -g node-inspector.
2:USE_MOCK=true video_port=8092 photoDirectory="/tmp" video_url=“http://localhost:8092/?action=stream” node-debug --web-port 3080 cockpit.js
yes,the firefox chome start like this


i press the F8,and it does not show anything like the pilotcockpit!just like this:
so may be i understand wrong about this,how to debug the cockpit code ?how to show the pilot picture like that?


#2

So the node-inspector which is running on the top picture is debugging the node.js process. It you want to also debug the javascript side you have to use the javascript debugger in your browser. In Chrome you get to it under View->Developer->Developer Tools

Good luck