3

Does anyone know how to use WebStorm for JavaScript debugging of an ASP.NET MVC application? I am running my ASP.NET MVC application locally using IIS, and I am trying to use WebStorm's remote debugging features to step into JavaScript code. My understanding so far is that you can map local files to the hosted ones, but I'm not sure how to do this since my local files are razor views and don't map 1-to-1 to the HTML that is served via IIS. Any suggestions on how to set this up, or resources on how to do so, would be greatly appreciated.

6
  • You can simply use Chrome's dev-tools instead.. Commented Jul 22, 2012 at 14:26
  • Does this provide a way to setup javascript unit tests? Commented Jul 22, 2012 at 14:31
  • I think you have a better chance of getting your question answered on jetbrains forum than here.. Commented Jul 22, 2012 at 14:42
  • 2
    is using Visual Studios debugger an option? Commented Jul 22, 2012 at 14:42
  • Try Remote JavaScript debug configuration, it will load the rendered page from the site where you can place breakpoints. Mapping will not work here. Commented Jul 22, 2012 at 15:30

2 Answers 2

5

I just found your question searching for answers to a different question.

I am running a web application using ASP.NET MVC 5 and several C# libraries supporting it. We use AngularJS and I spend 90% of my time developing in JS on this project. I just downloaded WebStorm 7 as a trial and I created a new project that points to the directory that contains all of my ASP.NET MVC HTML/JS files (it's my entire ASP.NET web project, which excludes my C# libraries, etc.). I am able to set debug breakpoints in WebStorm on my JS files, and it all works well - super easy. This is one option for debugging your ASP.NET app via WebStorm.

The alternative is to use your browser's dev tools, then make changes to your JS files in VS. Otherwise, getting debugging to work in WebStorm was fast and easy.

It has been 1.5 years since you posted this question, so you have moved on I am sure, but for anyone else reading this - hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

0

Debugging JavaScript is the same no matter the backend:

  • setup a minified/unminified toggle via a cookie or query param
  • check the console for errors in the unminified code
  • set up breakpoints to see what is causing the error
  • use the browser developer tool to test possible solutions

There are also remote debugging IIS instructions as well as cross-domain JavaScript setup information.

References

Comments

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.