This Question is Answered

1 "correct" answer available (4 pts)
13 Replies Last post: Jan 3, 2014 11:59 AM by Seb Kouba  
Seb Kouba Newbie 22 posts since
Apr 25, 2013
Currently Being Moderated

Dec 8, 2013 10:05 PM

Storm & Debugging (AngularJS) not working in one Project

I've completely hit a wall and I don't know where to start looking. I have two projects. Debugging works perfectly in one of the (git pulled todoMVC folder). I've set up a project myself (and downloaded the angular-seed on a third attempt) and I can't get the debugging to hit breakpoints on either of the new projects. When I copy my new project into the folder of the first (todoMVC), I can debug the exact same code that wouldn't work in its own project.

 

I start the session via live debugging with identical configurations on my local xampp install.

 

I get the following errors in Storm. Line 7 is where I've set the breakpoint.

 

Capture.PNG

 

Any suggestions on what I could try?

When I don't set a breakpoint I get a few "Failed to load resource" errors on .js.map files but that seems to be an inconsequential bug as far as I've found out...

 

Thanks for your time!

Elena Pogorelova Apprentice 850 posts since
Oct 5, 2011
Currently Being Moderated
Dec 9, 2013 2:10 PM in response to: Seb Kouba
Re: Storm & Debugging (AngularJS) not working in one Project

Hello!

 

does your application run fine if no breakpoints are set? I.e. are all files successfully loaded in the browser, etc.?

What does your Javascript Debug run configuration look like?

Elena Pogorelova Apprentice 850 posts since
Oct 5, 2011
Currently Being Moderated
Dec 10, 2013 5:16 PM in response to: Seb Kouba
Re: Storm & Debugging (AngularJS) not working in one Project

Hello!

 

I can't comment on your previous setup as I have no idea what it looks like:)

 

>Are there any files in the project that are able to influence the config of the server or Storm?

 

in Storm - no. But the way you run your application definitely depends on application code. For example, you can't just open HTML served by a node.js server in browser and expect the code to work without running the server itself

 

>Is there something beyond the simple path in "Run/Debug Configurations"?

 

it depends on a way you run your application:) For a simple web application being run onh a builkt-in web server, the page URL is all you need. For external servers remote URL mappings are required, etc.

 

Please can you attach the project that shows your initial setup so that I can see what's wrong with it?

Elena Pogorelova Apprentice 850 posts since
Oct 5, 2011
Currently Being Moderated
Dec 10, 2013 7:31 PM in response to: Seb Kouba
Re: Storm & Debugging (AngularJS) not working in one Project

No just an .idea folder wouldn't give me a clue, as I don't know what your application looks like - and the the configuration absolutely correct for one application would be wrong for another

Elena Pogorelova Apprentice 850 posts since
Oct 5, 2011
Currently Being Moderated
Dec 12, 2013 3:37 PM in response to: Seb Kouba
Re: Storm & Debugging (AngularJS) not working in one Project

Hello!

 

sorry for the delay with getting back to you - these days were busy...

I've created the project and configuration using your steps. Debugging works as expected for me. Just 2 additiuonal steps:

 

- I changed 'open' livereload option from 'true' to 'false' in gruntfile to avoid a seconf tab being opened on 127.0.0.1:9000 - I only need a single Chrome tab opened with javascript debugger on localhost:9000

- I put breakpoints in app.js

 

Started my Node.js run configuration in debugger - here is the output:

 

"C:\Program Files\nodejs\node.exe" --debug-brk=55284 C:\Users\Elena.Pogorelova\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt server
debugger listening on port 55284
[ReferenceError: process is not defined]
Running "server" task
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]
[ReferenceError: process is not defined]

 

Running "clean:server" (clean) task
Cleaning .tmp...OK

 

Running "concurrent:server" (concurrent) task
   
Running "coffee:dist" (coffee) task

 

Done, without errors.
   
Running "copy:styles" (copy) task

 


Done, without errors.
   
Running "compass:server" (compass) task
directory .tmp/styles/
       create .tmp/styles/main.css (2.447s)
    Compilation took 2.45s
   
Done, without errors.

 

Running "autoprefixer:dist" (autoprefixer) task
Prefixed file ".tmp/styles/main.css" created.

 

Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:9000.

 

Running "watch" task
Waiting...

 

The page is successfully loaded, debugger stops on breakpoint.

 

>I guess the main question is whether it even makes sense to use "grunt server" with live editing

 

by live editing, do you mean enabling the 'after launch' in Live Edit/Browser tab of run configuration? Or using the livereload Grunt task?

The former does make sence for me even if you aren't going to use WebStoirm Live Edit feature - as you have the browser started automatically on launching your node.js configuration, so that you don't need to do this manually

Elena Pogorelova Apprentice 850 posts since
Oct 5, 2011
Currently Being Moderated
Dec 12, 2013 11:53 PM in response to: Seb Kouba
Re: Storm & Debugging (AngularJS) not working in one Project

I don't see any 404 errors when running/debugging my code. Note that I  don't put it in any web server doc root, as it doesn't need a webserver  to run - files are served by server created using Grunt connect task.

 

I've tried to attach a project for your reference, but it is too large

Vladimir Krivosheev Novice 218 posts since
Mar 3, 2007
Currently Being Moderated
Jan 2, 2014 11:32 PM in response to: Seb Kouba
Re: Storm & Debugging (AngularJS) not working in one Project

It seems it is working due to our improved magic mappings

 

>> to avoid the "read only popup"

Could you please attach test project and I will fix it?

More Like This

  • Retrieving data ...