Reputation: 12203
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.
Upvotes: 3
Views: 3594
Reputation: 24617
Debugging JavaScript is the same no matter the backend:
There are also remote debugging IIS instructions as well as cross-domain JavaScript setup information.
References
Getting "The data is invalid." error when attempting to run project – JetBrains Rider Support
Using Project Rider under Windows without Visual Studio: prerequisites – JetBrains Rider Support
WebStorm Help: Configuring Synchronization with a Web Server
Upvotes: 0
Reputation: 878
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.
Upvotes: 5