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?

ali-myousefi
  • 822
  • 2
  • 11
  • 26

1 Answers1

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

ali-myousefi
  • 822
  • 2
  • 11
  • 26