Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Nov 11, 2013 @ 13:56
    Robert Foster
    0

    Visual Studio Browser Link breaks DAMP

    Jsut a heads up - when debugging/running the website through Visual Studio 2013, you may experience issues with DAMP controls on document types etc.  Basically, Browser Link turns

                    + "</script></head><body></body></html>";

    into

                    + "</script></head><body>
    <!-- Visual Studio Browser Link -->
    <script type="application/json" id="__browserLink_initializationData">
        {"appName":"InternetExplorer"}
    </script>
    <script type="text/javascript" src="http://localhost:63769/f68451d207624ba98099dda56bd76b5f/browserLink" async="async"></script>
    <!-- End Browser Link -->

    </body></html>";

    I've not come up with a solution just yet other than modifying the source of DAMP...

  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Nov 11, 2013 @ 14:37
    Robert Foster
    100

    Ok, so here's what I've done to fix this little bugbear:  Change \umbraco\plugins\DigibizAdvancedMediaPicker\DAMPScript.js on line 21 to:

     + "</script></head><body>"
    + "</body></html>";

    It appears that browserlink does some sort of regex insertion inside any body tags it finds, and doesn't care whether they are string literals in javascript or not.

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Nov 11, 2013 @ 14:43
  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Nov 11, 2013 @ 14:49
    Robert Foster
    0

    ah nice!

  • Arjan 9 posts 62 karma points
    Nov 16, 2013 @ 11:32
    Arjan
    0

    It is a VS 2013 "feature". You can turn it off in web.config:

      <appSettings>

    <add key ="vs:EnableBrowserLink" value="false" />

  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Nov 16, 2013 @ 12:57
    Robert Foster
    0

    Indeed - however, I find the feature quite nice and don't want to turn it off... hopefully it will be fixed in a not-too-distant update, and we won't have to turn it off or code around it.

    Note: you can also turn it off inside Visual Studio (also discussed in that blog post).

    - Rob

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Nov 16, 2013 @ 13:05
    Stefan Kip
    1

    I've already fixed it. We'll release an update very soon.

  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Nov 16, 2013 @ 13:10
    Robert Foster
    0

    Yup, didn't think it was too far away :) good work!

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Dec 06, 2013 @ 18:00
    Jeroen Breuer
    0

    DAMP 2.7 is out with this fix.

    Jeroen

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies