0

I've inherited an AngularJS frontend. It has no VS solution, project, nothing like that. I prefer VS as an editor, even without the frills of Intellisense (this is a pure JS AngularJS). I can still open the project folder in VS, edit, git, and boot it up via the command line: C:\dev\project> npm start

But I'd love it if there were a way to attach breakpoints and debug through VS. I haven't found such a way, as the path of least resistance has now become starting new ASP.NET/Angular projects in VS with a template; but I'm working with a pure AngularJS frontend already started. Ultimately I'm looking to step debug the JS, but the first step is getting the app running.

I know the VS Code paradigm (just open into a project folder, then it uses simple json config files to work) fits this scenario better, but even then there's some assembly required to get my AngularJS running and debugging with the Chrome debugger, and if a configuration exists for VS I'd rather use that.

Please note that I can run AngularJS/ASP.NET projects in VS, but there's some basic knowledge I lack in order to open up a pure AngularJS folder and run it through VS.

4
  • Possible solution: stackoverflow.com/questions/44746884/… Commented Aug 7, 2018 at 23:45
  • Thanks for the link, but that answer is "run the application in IE". I couldn't figure out how to do that... hence this question, "How to run AngularJS in VS". The ultimate goal is debugging, but I have to be able to run it before I can debug it. Commented Aug 8, 2018 at 13:52
  • Trying to get an Angular CLI project to work in Visual Studio with debugging is, in my experience, an exercise in frustration. If you open the project in VS Code you should be able to just use ng-serve to get it running on a port that you can browse to. Commented Aug 9, 2018 at 2:35
  • That may be true, but it's worth a try to see if anyone knows how. As far as VS Code; yes it's easy to start with ng-serve, npm start, gulp serve etc, but that won't attach the VSCode debugger to it, so that's no different than just running any of those commands from PS/cmd Commented Aug 9, 2018 at 20:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.