Solved

debugging a asp.net mvc partial view page with Chrome

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

791 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