Jhipster and debugging angular js - javascript

I've built the jhipster sample application. I am quite new to angular so this may be a silly question, but how do I debug the angular javascript (ex. app.js). I am using Intellij Idea Ultimate 14.0.2 on Windows. I installed the JB plugin for browser debug in chrome and of course enabled debugging. Still I can't get the editor to stop on break points. Hummm frustrating...if anyone has an idea I would greatly appreciate their wisdom.

There is a plugin for chrome and special configuration setting for the IDEA
1. Install the JetBrains IDE Support extension for Chrome
2. Create a new JavaScript Debug configuration on Intellij
3. Configure your JavaScript debug configuration
4. Debug your JavaScript Debug Configuration

Related

What is this cordova build error \ip-regex\index.js:3?

I uninstalled Visual Studio 2017 because so many issues trying to build a blank cordova app. I installed VS2015 expecting its better for it. But Im still getting error about this js script that saying a syntax error.
This is my environment variables, Ive installed 32 bit git manually and the java 32 bit sdk.
Can anybody please tell me what am I doing wrong setting cordova for visual studio 2015?
Here is the final close up error Im getting just building a newly created cordova project.
I just got the same problem. I know it was some time ago, but maybe someone will save time:
The library ip-regex have no fixed version and latest is not compatible.
You should change content of index.js with older version e.g.: https://github.com/sindresorhus/ip-regex/blob/9b6153933a856153fe2ca78081f8851761f03b6c/index.js
Or replace version in package configuration.

How to run and debug an AngularJS application in Eclipse?

I'm trying to get started with Nodeclipse. I would like to run and debug an AngularJS application, e.g. the angular-phonecat example from Eclipse.
In particular, I would like to
use a Debug on Server launcher to start a server with my application and open a web browser (Firefox or Chromium).
set a breakpoint in a JavaScript file in Eclipse
click around in the web browser and have the Eclipse debugger stop at the breakpoint.
(The equivalent of this does work in NetBeans in a very intuitive way.)
From the Nodeclipse help, I don't see how to get started or whether this is possible at all.
I managed to run an debug a Node.js project with the Hello World template, but I don't see how to debug anything running in a web browser.
Does that require a Remote Javascript debug launcher? If so, how to use it?
Finally, I don't see how to actually run an AngularJS application in Nodeclipse. As far as I can tell, the AngularJS Eclipse plugin only implements editing features but does not deal with running and debugging. Do I need to turn the Angular project into a Node.js application? If so, how?
AngularJS runs in browser, Node.js on server,
so you need different approaches.
Nodeclipse is primarily about supporting Node.js and has ChromeDevTools-based debugger. I cannot tell what is best for debugging browser JavaScript, maybe it is Chrome browser.
managed to run an debug a Node.js project with the Hello World template, but I don't see how to debug anything running in a web browser.
Ask on https://github.com/angelozerr/angularjs-eclipse/
Do I need to turn the Angular project into a Node.js application?
For Node.js run/debug it is not needed.

debug Grails app's JavaScript from IntelliJ

I use IntelliJ to develop Grails apps and when testing locally, I usually launch the app from IntelliJ which runs the app in an embedded Tomcat server. IntelliJ provides JavaScript debugging, but until now I've always used Firebug, but the idea of being able to use IntelliJ for all my debugging is pretty appealing.
I tried setting a breakpoint in IntelliJ and lauching the app in debug mode from inside IntelliJ, but the breakpoint was ignored. I also tried launching the app from outside IntelliJ via grails-debug run-app, then connecting to it with a remote JVM debugger, but the breakpoint was still ignored. Does someone know how I can debug JavaScript of a Grails app launched from IntelliJ?
I'm using IntelliJ Ultimate Edition version 13
Actually you need to do some extra work for debugging JavaScript with IntelliJ. Here are some useful articles about how you can configure your IDE and browser for JS debugging.
http://blog.jetbrains.com/idea/2011/03/intellij-idea-debugging-javascript-in-google-chrome/
http://wiki.jetbrains.net/intellij/Debugging_JavaScript_with_IntelliJ_IDEA
After configuration you need to just run your Grails application in debug mode.

Debug JavaScript in WebStorm

Is it possible to debug JS files from within WebStorm IDE? Preferably, running the app in a Chromium browser instead of using using Chrome developer tools. How do I debug from within WebStorm?
Yes, it's possible. You need to install the "JetBrains IDE Support" add on. Btw: you can run since version 7 Html/JavaScript projects with the builtin webserver.
Since WebStorm 2017.3 you can now use Chrome DevTools and WebStorm debugger at the same time. You no longer need an additional Chrome extension to debug apps in WebStorm.
Read about it in Debugging JavaScript with WebStorm 2017.3

Meteor JS, running in a debugger?

I'm curious if anyone has a solution for running meteor in a debugger. I have some experience with running regular node in a debugger, have used JetBrains Webstorm for this, however it doesn't seem to support meteor (as far as I can tell). If anyone has a solution, would appreciate any information. It seems, eventually this will need to be possible for meteor to become a longterm viable platform.
It looks like the meteor startup script does not support a debugging option at this point, but you can fix this yourself:
Open the meteor startup script in a text editor (use which meteor to find it)
Change the last line (add $NODE_DEBUG parameter):
exec "$DEV_BUNDLE/bin/node" $NODE_DEBUG "$METEOR" "$#"
Now you can launch meteor in debug mode like this:
NODE_DEBUG=--debug meteor

Categories