Solved

debugging a asp.net mvc partial view page with Chrome

Posted on 2016-09-21
1
109 Views
Last Modified: 2016-09-28
I read this article on debugging javascript using Google Chrome

https://developers.google.com/web/tools/chrome-devtools/debug/breakpoints/step-code?hl=en

I tried their example with a html page and aspx page and it works great.

I click the Sources tab and then click on my page which is circled in this image and then the code for my page appears in the middle window and on the right is my watch and step into window.
debugg screenshot on chrome

My question is this.

I have a ASP.NET MVC 5 application.

I have my default view called Default.cshtml.  It's made up of two partial views called

Partial1.cshtml
Partial2.cshtml
I want to debug some JavaScript that I have on Partial2.csthml

But on the debugger it just shows my main page Default.cshtml but when I click on it my code doesn’t appear in the middle window. Like in the example in the article above. So since I can’t see the code I can’t set any breakpoints.

Anyone know whant I’m doing wrong?
or
Has anyone tried debugging a ASP.NET MVC partial view page with Google Chrome or some other Web Browser?
0
Comment
Question by:maqskywalker
1 Comment
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
ID: 41809314
partial 1 and partial 2 wont show up separately.. once rendered all will be under the same html page for example

localhost:9999/home/index

will have code from default.cshtml partial1 and partial2
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question