Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6660743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:11:35+00:00 2026-05-26T02:11:35+00:00

I am using MVC and jquery to pull in a function from the server

  • 0

I am using MVC and jquery to pull in a function from the server (as a partial view which I generate on the fly and append to the body of the html) and execute it. This works fine, I can view it in fiddler, but debugging is terrible. I pull in the method using something like:

    $("#makeGrid").click(function (e) {
        $.get('/gridder/basicgrid', callbackFn);
        function callbackFn(data) {
            //Append markup to dom
            $('body').append(data);
            // call the js function from the partialview here 
            generateGrid();
        }
    });

Whether this is best practice or not I’m not sure, but if I ‘view source’ after the ajax command, the code isn’t visible, and using the debugger; command doesn’t seem to work. Eg:

    function generateGrid() {
        alert("start");
        debugger;
        alert("end");
    }

Creates the two alerts but doesn’t bring up the debugger even though firebug is active. This discussion raises a similar issue. Some worked around it by using debugger twice (this bug meant to be gone now) or opening firebug in a new window (no luck). Even eval(‘debugger;’); was suggested by someone in another thread but no good!

Any suggestions? (including using a tool other than firebug if needed, but I want to debug, not view fiddler-style)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:11:36+00:00Added an answer on May 26, 2026 at 2:11 am

    Doesn’t look like a conclusive answer is coming on this one. For others’ reference, I ended up getting debugging going in VS2010 itself, as follows:

    a) Must use IE as VS default browser. Firefox doesn’t like playing. If you’re using MVC, the default browser selector doesn’t come up against views etc like it does in webforms. A quick solution is to create an empty .html page in the root and right click that bastard to get ‘browse with…’ and select the desired default browser. Tada.

    b) Next, in IE’s advanced options, make sure you untick the ‘disable javascript debugging’ options.

    c) Now, you can use the debugger; command in your script within the view to break execution of your dynamically generated script. It will go back to VS and highlight the line. Because it’s generated it says [dynamic script] at the top. Breakpoints still don’t seem to work annoyingly.

    d) In IE, the js errors also are reported in the console. It will give you a line number and column, highlighting your file. If you have sent a dynamic partial view though, it highlights these coordinates in your original page file, which is not applicable. Rather, go to the equivalent coordinates in the “script block [dynamic]” tab of VS.

    In truth this is probably more useful for MVC development than what Firebug would have offered.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.Net MVC along with Jquery to create a page which contains
I'm using MVC 2 and the default view engine to return .ascx partial views
I am using a jQuery calendar to display events, which is designed to pull
Im using mvc 2, my view is as follows <% using (Html.BeginForm(ApplyLeave, ESS, FormMethod.Post,
I have a MVC app and using JQuery. I have anchor that I setup
I'm using MVC to validate some html text boxes on a page, for example
I have cascading drop down lists in a .net mvc view and am using
has any one using Spring MVC with Jquery! i have got a strange problem
Using ASP.NET MVC + jQuery : I need to use some values owned by
I am using asp.net mvc and jquery to make ajax requests and when the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.