1

When I loaded html file that contains javascript code by using the following code

$("#containerId").load("@Url.Action("ActionName")");

I couldn't find it in the chrome source tab I find out chrome renames js-loaded file to something like "VM27123" that the number changed by every refresh and chrome does not show these files in search result

so how can I find them and set breakpoint on it?

1 Answer 1

4

omatase's answer:

use the syntax:

//# sourceURL=fileName.cshtml

immediately after opening your script tag. Example:

<script type="text/javascript">
    //# sourceURL=fileName.cshtml
    function foo() {}
</script>

and you can find your javascript in sources tab on debug mode by fileName

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.