When I first installed the latest version of node-inspector (0.9.2) running it with 'node-inspector app.js' I had the debugging session opened automatically in Chrome and the app was automatically running at localhost:5000.
Now running the same command I just get this:
D:\Work\examples\mozaik-demo-master>node-inspector app.js
Node Inspector v0.9.2
Visit http://127.0.0.1:8080/debug?port=5858 to start debugging.
And then I have to open another prompt window and run the app with 'node --debug app.js' then open the browser windows at 'http://127.0.0.1:8080/debug?port=5858' and 'localhost:5000'.
This is so much an overhead, how can I make it work as it did the first time? Installing and uninstalling node-inspector doesn't help.
Thanks.
The command node-inspector was never opening Chrome. It was always starting the backend web server only.
You should use the command node-debug instead. This command will start the backend, start the application in debug mode, and open the browser for you.
D:\Work\examples\mozaik-demo-master>node-debug app.js
node-debug is NOT well maintained. I'm now using devtool: https://github.com/Jam3/devtool. It's great.
Related
I've tried forking and cloning the three.ar.js GitHub repo, then cd'ing in and running 'npm run dev' as suggested in the README, but no matter what I do, I get all kinds of problems. Any help would be great!
npm install http-server
run http-server in the examples folder.
What i did was just copy the example project to my domain, install the WebARonARCore browser on my phone with ADB, paste the URL to the html file in your webARonARCore browser and it works like a charm.
I can even do remote debugging with my chrome browser (only seems to work while my android studio is running and the phone is attached via USB ofcourse).
But this is on an external/remote server though. Don't know about local.
Running my Electron app via command-line works fine, but when I double-click the .exe of the packaged app, nothing happens other than my cursor doing a quick "busy" animation. I assume my app is silently crashing.
Is there a way I can get an error message or a crash report from the .exe to help me see what's going on?
From the root of my app directory, both these methods result in my app running fine:
node_modules\.bin\electron.cmd .
electron-packager .
node_modules\.bin\electron.cmd my_app-win32-x64\resources\app
Environment
OS: Windows 10 Anniversary x64
Node: 4.3.1
Npm: 1.14.12
Local electron: 1.4.3
Local and Global electron-packager: 8.1.0
electron-rebuild (for native module "serialport"): 1.2.1
This was not an Electron problem. This was my app trying to access a path relative to process.cwd(), which, when double-clicking the .exe file in the output folder, was not the expected one.
I was able to debug this by running the .exe from the command line, instead of double-clicking the .exe:
my_app-win32-x64\my_app.exe
This causes console.log() output to be visible in the command prompt, which allowed me to finally see the exception that was occurring.
One way to debug such issues is to open a terminal or cmd and drag the exe to it or launch the exe from the terminal or cmd. this will print any uncaught error the app might be throwing.
This can be an issue with paths if you're spawning sub processes - you can use https://github.com/jonluca/node-fix-path to fix the paths on linux and macos
I am running meteor on Windows, possibly a minority here. I searched and found solutions for Linux and possibly Mac but no one has provide solutions for Windows. Maybe someone can help?
First I modified the meteor.bat file under C:\Program Files (x86)\Meteor to included --debug as mentioned in other posts:
#echo off&&"%METEOR_PATH%\bin\node.exe" --debug "%METEOR_PATH%\app\meteor\meteor.js" %*
I started my node-inspector and received an instruction to visit 0.0.0.0:8080/debug?port=5858 to start debugging
I then started my meteor application, but when I go to http://127.0.0.1:8080/debug?port=5858 I saw two squares: one for Scripts, and one for console. Nothing came up when selecting Scripts.
Does Windows have the same issue as Linux, spawning two processes but only one with the debug flag?
Version 0.5.3 added the NODE_OPTIONS environment variable that passes those parameters directly to node.
So fire-up your favorite js debugger like node-inspector
Assuming you already have it installed, call
node-inspector
Then
set NODE_OPTIONS = --debug
meteor
Do this inside your project folder, you can also use the --debug-brk to break immediately on start
In Chrome open localhost:8080 in a new tab
Have fun
I followed Vojta's video about how to do debug angularjs in Webstorm.
http://www.youtube.com/watch?v=MVw8N3hTfCI&feature=plcp
However, every time I stop the testacular server in webstorm. I have to reinstall the webstorm debug extension for chrome. Am I doing something wrong? Do I need to install it into some Chrome profile or something?
Seems to be working OK this morning. I think I was running testacular from the command line as well, which was using up the default port of 9876 and was giving me unexpected results because my webstorm testacular server was running on 9877 instead, but I had configured webstorm debug to run on 9876.
All good now.
I have installed Firefox on my Server (running Debian 6.0) but when I try to launch it I get the following message:
Error: no display specified
After googling I installed xvfb and now I have this error;
Xlib: extension "RANDR" missing on display ":99.0".
and it freezes.
Can anybody help me?
Update: I'm now able to run Firefox, but I don't want it to open up a local window but everything should be done on the server side. It should just open up, play a macro (made with iMacros) and then shut down. The opening and the closing will be handled by a script.
Thanks
You are connecting with SSH to that Debian machine? Then call next time the ssh-command with -X as argument, this will pass the correct display options to the server.
Launch this from your box's xterm:
ssh -X debian-server dbus-launch firefox