简体   繁体   中英

Debugging javascript in ASP.NET project

I'm just starting doing js development, my experience with server-side, XAML, etc. I'm used to intellisence and nice debug experience.

Now I'm struggling. What is the best combo for debugging asp.net with javascript in VS2012? I'm using jQuery. I'd like to have debug breakpoints saved and just edit/start/debug/stop/edit/start... as usual.

Right now when I had VS debugger it would cache js file and it really doesn't work. I have to clear browser cache on every restart. It is real PITA to work like this. F12 tools is not that great either. I have to find js I need and set breakpoints every time I restart application.

People with experience, any help on minimizing pain?

You can use VS2012 to debug the JS by adding the breakpoints as usual then attaching to the IE process after allowing access to debug JS in IE through the settings. That will let you step through the JS as you would code when debugging as normal

Guide (old but still works the same): http://www.codeproject.com/Articles/18921/Using-Visual-Studio-to-Debug-JavaScript-in-IE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM