Solved

debugging a asp.net mvc partial view page with Chrome

Posted on 2016-09-21
1
55 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…

777 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