SystemJS module loader: Enable JavaScript debugging with Visual Studio and Internet Explorer

June 26, 2016, Software Development

In a project, we switched from the JavaScript module loader RequireJS to SystemJS. After the migration, debugging JavaScript directly from Visual Studio in Internet Explorer stopped working.

The problem is that Visual Studio cannot detect the loading of script files because SystemJS uses JavaScript HTTP calls instead of injected <script> tags to load modules.

But there’s an option in SystemJS to use <script> tags. The option can easily be enabled as follows:

<script>
    System.config({
        meta: {
            "*": { scriptLoad: true }
        }
    });
</script>

After enabling this setting, JavaScript debugging should work as expected.

Tweet about this on TwitterShare on FacebookEmail this to someoneShare on TumblrShare on LinkedIn

Tags: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax