I recently joined the team which uses the node.js for the development. I am new to the whole node.js ride. I have used IntelliJ based IDEs in the past to configure to run and debug different programming languages. However lack of my understanding of node.js or for some other reason I cannot debug node.js application currently I am working on.
Using node v0.10.48, npm 2.15.1
I can run the application using the WebStorm IDE, but when I run the application, following is what I get in the console tab of debug panel. It also returns a > prompt in the console.
/usr/bin/node --debug-brk=44917 --expose_debug_as=v8debug <path_to_startup_js_file?
debugger listening on port 44917
debugger listening on port 44918
It stops for the break points that I put in the beginning of the file, but after starting the server nothing happens. Now I can't open client UI application, which makes calls to this node.js/express REST service. Even though it is up and running, I think.
By the way I know how to debug using node-inspector & browser. But not sure what am I doing wrong with IDE. The run profile works fine, but the same profile is not working for debug.
It turned out that application I was working on was spawning child process, which has to be debugged separately as a remote debugger. Webstorm was nice enough to support debugging both master and child thread at the same time, via two separate debugger.
The current node version used by the project is also relatively old. Which was also the part of the issue with the webstorm. It was verified by the jetbrain support team member.
I installed WebStorm on my PC and started NodeJS server. I am able to access it from Chrome and Firefox browsers using localhost but not with my PC's IP address.
I followed instructions given here. I verified whether extension is enabled or not in Chrome as well checked the port no in WebStorm's Build, Execution, Deployment -> Debugger. My PC's firewall has been turned off. Still I am unable to access it using IP address.
Can anyone guide me how to go about this?
I am running WebStorm in my PC and trying to access it from the same machine through above browsers.
Using WebStorm 2016.3.3 version.
Here are my findings when connecting to WebStorm's internal web server via Chrome using the following:
WebStorm 2018.1 Build #WS-181.4203.535
Windows 7 6.1, 64 Bit Pro
Chrome Version 65.0.3325.162 (Official Build) (64-bit)
Chrome connected to localhost:63342 but returned connection refused when attempting to connect to WebStorm at <ip address of machine>:63342, even with Windows Firewall disabled.
I first configured WebStorm to listen at port 63343 instead of 63342 and still had the same result. Unexpectedly, with this setting WebStorm answered at both localhost:63342 and localhost:63343, even after restarting WebStorm.
I then noticed that with either of these ports, WebStorm's Can accept external connections checkbox was grayed out and unchecked. Changing WebStorm's port to 1338 alone still resulted in Connection refused at http://<ip address of machine>:1338. Turning off Windows firewall did not affect this.
Since WebStorm's Can accept external connections checkbox became usable after I changed its port to 1338, I now checked the box. Chrome was now able to reach WebStorm at http://<ip address of machine>:1338.
So it seems that it is not the port itself that makes a difference, but WebStorm's Can accept external connections checkbox. Note that checking this box may be a security risk if you are using a shared network since WebStorm will now serve pages to other stations as well as your own.
Got answer for this in this post I changed the default port no to something else and now i am able to access the page from the browser using ip address.
In JDK 8 u 5 I have sample project that uses comm.jar and win32com.dll to communicate with a serial port.
I setup javax.comm correctly and put the related files in the JDK and JRE and was able to run sample code with out error.
I then created a JavaFx project with netbeans and used the sample source code, and also generate Key and set netBeans to sign my code. I also imported the cert to my system and this file to the java exception list.
When I run this with JavaFx it works correctly and communicates with the serial port.
but when run it on a browser I get a javax.comm.NoSuchPortException. If I click on the jnlp file and run it on web start the same things happens.
What is wrong? I'm sure javax.comm is correctly setup on my computer, the jar file is self signed, and the generated cert file is imported. Why does it work on desktop mode but do not work on browser and web start?
Can anyone provide a short list of steps on how to connect a Meteor app to the WebStorm debugger please?
WebStorm is the only IDE with native support for debugging Meteor server code - check this video. Even on Windows, debugging is very simple:
WebStorm 9+
Go to Run --> Debug --> Edit configurations... , click the plus sign, click "Meteor". You can add environment variable like ROOT_URL if you need to.
WebStorm older than 9
This answer is kept only for historical purposes. You should upgrade WebStorm.
On older WebStorms, you used to have to create a Node.js debugging configuration.
on the server, export the environment variable NODE_OPTIONS=--debug=47977. For instance,
NODE_OPTIONS=--debug=47977 meteor # Linux/Mac
set NODE_OPTIONS=--debug=47977 & meteor` # Windows
create a WebStorm/PhpStorm Run/Debug configuration using the port above (47977) and the server host. Leave 127.0.0.1 if you're debugging locally.
in WebStorm, Run -> Debug <myapp>, or press Shift+F9. Make sure that you see "Connected to <your host> in the Debug panel
Now you can set breakpoints, have access to local variables etc.
For client debugging, just use the Chrome debugger, or Firebug.
Troubleshooting
Process disconnected unexpectedly - this happens when meteor restarts automatically because of lack of specific support for Meteor. Just Run -> Debug <myapp>, or press Shift+F9 again.
you can't connect to the server - make sure the firewall rules allow incoming connections to whatever port you chose for the Node.js debugger (47977 here).
The other answers are now out of date. Don't add a Node.js debug configuration as described above, or bother with spyjs.
If you're using Webstorm 9.0, it's as simple as going to Run --> Debug --> Edit configurations... , click the plus, click "Meteor".
WebStorm may also ask you to install a browser add-on, but that's just for client-side debugging; just add a breakpoint in the server-side code and you'll see it works out of the box.
JetBrains have updated the video which was linked to in Dan Dascalescu's answer above, and it shows you the process I just described.
For applications using webpack:webpack, using WebStorm's Meteor debug profile did not seem to work.
My setup uses webpack:webpack v1.0.12, Meteor v1.3.0 and WebStorm 2016.1, but is likely to work with later versions (note that a fix for just this issue was released in v1.0.12, so earlier versions are likely not to work with this procedure).
Here is what I did in order to get it working:
Create a webpack.json file at the project root.
It should include the devtool config, which generates source maps that assist in debugging. The rest may be changed according to your specific setup.
{
"root": "src",
"devServer": {
"host": "localhost"
},
"devtool": "source-map"
}
Create a debug setup:
Node.js Remote Debug, port 5858 (the port is configurable).
Run meteor debug
You may specify a port using --debug-port <port number>.
See meteor help debug for the full details.
Connect WebStorm to the debugger
start the debugger
the status message should indicate that it is connected. Scripts should available in the Scripts tab.
the server should be running in the console
Hit your breakpoints and rejoice.
WebStorm 9 will have Meteor support. While WS 9 isn't released yet (as of Oct 7, 2014), there is an early access program for WS 9.
Read the JetBrains WebStorm blog which describes some of the Meteor support features and includes a brief video.
I'm new to Meteor, WebStorm (and JavaScript for that matter) and have been using the WS 9 EAP build 138.2406 for a couple of weeks. I can launch my project from within the IDE, set breakpoints, walk though code, inspect values, jump to definitions, and issue completions. It's quite helpful.
You can try spyjs plugin for Webstorm: http://blog.jetbrains.com/webstorm/2014/04/spy-js-webstorm-secret-service/
There is a bug with old versions of Webstorm to debug server-side of Meteor 1.2.x. The latest version of Webstorm (11.0.3) released on Dec 24th, 2015 fixed it. Release notes can be found here: https://confluence.jetbrains.com/display/WI/WebStorm+143.1559.5+Release+Notes
I am now able to debug without any problem from Webstorm :)
I'm trying to open my debugger for an Android project. The emulator opens fine, but the debugger is hanging and thus never fully loads. I keep getting this message, that never goes away:
"Attempting to connect debugger to 'com.example.android.myApp' on port 8616" (The connection never completes).
I am using Linux Ubuntu 10.10.
Thank you all for your help. :)
Matt
set the following flad in your AndroidManifest.xml in the tag application
android:debuggable="true"
Note following Article: Eclipse Android: Could not open Selected VM debug port (8700)
This aswell: Could not open Selected VM debug port (8700)