Problem Debugging Content Script in Edge

Confirmed Issue #13829248 • Assigned to edgedevtoolstri


Sep 19, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 5 people

Sign in to watch or report this issue.

Steps to reproduce

I am having issues using the F12 tool to debug content script. I have added a simple Edge Extension that change the color and font of a web page. The script is very simple. The problem is that I do not see the Content Script nor the Extension in the Debugger after pressing F12.


Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Robert,

    This link might be of useful.  Look at the section starting with "Content script debugging".

    Also, I attached a screenshot, with highlights, of my debug session of your script.

    Let me know if you this is not the issue.  Appreciate the support,

    The MS Edge Team

  • “might be of useful” Me speak pretty one day… :-/

  • I’m seeing the same issue using the very simple text_swap sample extension. See for more info.

  • BTW, @Steven K. – the documentation you point to just doesn’t seem to work for Content Scripts any longer.

  • the issue I see is that the ContentScriptExample does not show on the Debugger tab. So we are unable to debug this simple example. The script is loaded and the text font changes, but the script does not show

  • the issue I see is that the ContentScriptExample does not show on the Debugger tab. So we are unable to debug this simple example. The script is loaded and the text font changes, but the script does not show

  • Hi,

    Sorry for the delay.

    Thank you for the feedback on the instructions not working.  I will try it again.  I thought I did try it already, but let me verify.


  • Hi Steve!

    Is there any news on this?
    I’m developing an extension that opens a popup. But by clicking the menu button of my extension, nothing happens. And since the extension doesn’t show up in the debugger tab I have no chance to see what’s wrong.

  • @Steven K.
    Did you try it again?
    I have the same issue in
    Microsoft Edge 41.16299.248.0
    Microsoft EdgeHTML 16.16299

  • Hi,

    I did try it again and was able to debug the various files from both the base ContentScriptExample extension and Robert’s modified version attached to this ticket.
      I believe there are two main issues here.

    1. Debugging the content scripts requires the content script to be loaded properly.  In Robert’s modified version the main F12 is throwing errors installing the content script due to the syntax of the Range call.  I modified the first line

    if (!Range.prototype[“intersectsNode”]) {

    if ( !Range.prototype.intersectsNode ) {

    and then the console showed the next error in the content script loading.  E.g the Navigator language test.  Similar change will also correct that.  Work out all of these issues and then we can move on to actually debugging the content scripts functionality.

    1. To debug a loaded an running content script, make sure that you have navigated to a URL that is supported by the content script.  E.g. in the standard extension demo "Content Script Example".  Then open the F12 debugger.  Find the extension.  Refresh the page.  Then you should see the content script.  I have attached a screenshot.

    To debug a pop-up or an extension page, use the following syntax to load that page:

    ms-browser-extension://<Extension Unique Id>/<my_page.html>

    You can get the ‘Extension Unique Id’ by right clicking on the extension icon at the top of the browser and selecting manage.  I have attached a screenshot.

    I found the short video in the following URL very helpful in working out the nuances of debugging the various items of an extension:

    Let me know if anyone is still having an issue getting the debugger to work for any of an extensions content.  I am also attaching a screenshot showing a link from the Extension info page to go directly to background/content scripts debug console.

    I did my testing on 16299.248.


  • @Steven K.
    Thank you for the effort!
    I’ve tried to load simple borderify extension which uses content script. Unfortunately it doesn’t work on my PC.
    When I load appropriate page, border appears, but in F12 there isn’t “folder” of extension.
    I’ve downloaded two virtual machines with Edge 41.16299.15.0 and "42.17… etc _preview". And there all is fine! All works like on your screenshots: open F12, go to debugger and there is extension “folder” with content script.
    Since Edge can’t be reinstalled separately from windows 10, I completely disappointed on how to repair my PC… I can’t do clean install whole operation system. There are lot of settings and software of my development environment (not to mention windows settings that I changed from default too)
    P.s. I even have tried to use power shell and Add-AppxPackage command with AppXManifest.xml to ‘reregister’ Edge for all users on my PC, it’s been done successfully but seems nothing’s changed at all…

  • @Steven K. – running 16299.248 as well but still not able to reproduce your results, even with the very simple text_swap sample extension. The extension works fine, but the content script never shows up in the list of scripts, even after a refresh (left panel, Debugger tab).

    Text Swap Extension

  • @Andrej B., you are welcome.  It was enjoyable actually.  :)

    A couple notes about your issue with your physical vs VM installations.

    1. Is your computer joined to a work domain and possibly fall under and special conditions as mentioned in the following URL?  E.g. MDM - Mobile Device Management.

    1. Will you provide the procedure you used to re-install Edge?  I recommend two methods.
         Method 1: Use the new built in reset feature for applications.  


    the system settings. 
    Win + I


    the “Apps” icon


    the “Apps & features” section search for “edge”


    click on “Microsoft Edge”


    “Advanced options”


    the “Repair” button


    the “Repair” option does not correct the issue repeat the procedures above
    except instead of “Repair” for the last step (#6), click the “Reset” button.

       Method 2: Using Powershell (I believe this is what you tried)

  • @Andrej B, I also wanted to mention that I just remembered a similar ticket where I was not able to help the user get the debugger working.  That ticket is still open.  If you think it is your issue, you can add that you also have the issue.  I have already sent an email to the group working on that ticket to see if they have a workaround or information.  I wish I had a better answer for you.  :/

    The following will not help your current situation, however, I install Windows 10 about every other day, and am a developer as well, and so I really dislike repetitive tasks such as re-installing an OS.  My suggestion is to create an automated and repeatable process to setting up a Windows environment.  I use chocolatey, boxstarter, and yarn to handle about 90% of my computer setup.  Here are my commands and my gist file for configuration.

    install chocolatey using an Admin PowerShell

    Set-ExecutionPolicy Bypass
    iex ((New-Object System.Net.WebClient).DownloadString(’))

    install boxstarter // reopen powerShell after install

    choco install boxstarter -y

    run boxstarter with gist

    Install-BoxstarterPackage -PackageName -DisableReboots


  • @Ken,

    I just ran into the same issue you are seeing.  It is good that I was able to see this behavior.  I will investigate why this is happening.

    In order to debug the script and see the Extension and the content.js script do the following:

    • Close all open Edge windows.
    • Launch Edge
    • Wait for prompt about extensions from unknown sources being turned off and select "Turn on anyway".
    • Navigate to the URL to debug.  In this case it is:
    • Open the debugger (F12)
    • Right click on the Extension’s Icon on the top right of the browser, to the right of the address bar.
    • Select ‘Manage’ and then “Reload extension”
    • Refresh the page.

    You should now see the extension and the script.



  • I wanted to mention that I ran testing in a recent Windows 10 development build and this issue is no longer present.  I.e. the scripts are loaded in the debugger view every time I tested.

    I will most likely close this as ‘fixed’ as there was an issue and is an issue in, however, it has been resolved.  I am not certain when this fix will be made public, It could already be in the latest insider fast release.


  • @Steven K. - I’m not able to get the content script to show up in the debugger even using your instructions, so maybe there’s something else a bit subtle going on as well. I’m happy to send you a video of what I’m doing but if the problem has been fixed in an upcoming version, then that’s great.

    Also want to thank you for sharing your steps for reinstalling on a PC – very useful!


  • @Ken, I would like to see a video of the issue.  I am curious about it.  While taking the video, can you open about:flags and scroll down?  I would like to see the options configuration.

  • @Steven K.
    Did you mean video like this?


  • @Steven K. – I think @Andrej B.’s video demonstrates the issue quite well but if you need to see anything else, just let me know.

  • @Steven K. – any update on this?

  • Hi Ken and Andrej,

    I do not have an update on this.  There is something else going on that I am not aware of.  I will request additional help.  We might ask you collect some extra logging.


  • Microsoft Edge Team

    Changed Assigned To to “edgedevtoolstri”

  • @Steven K. – thanks for the update, just let me know if you need any more info.

  • Thank you Ken.  We might e-mail you directly if that is ok with you.

  • @Steven K. – emailing me directly is fine, happy to help.

  • @Steven K.

    We might ask you collect some extra logging.

    If I can help just ask here or directly by email.

  • Microsoft Edge Team

    Changed Status to “Confirmed”

You need to sign in to your Microsoft account to add a comment.

Sign in