VS Code - Debugger for Microsoft Edge
Note: This extension currently supports both Microsoft Edge (Chromium) and Microsoft Edge (EdgeHTML). This extension can debug any version of Microsoft Edge (Chromium) but only some versions of Microsoft Edge (EdgeHTML). To see if your Windows version supports debugging Microsoft Edge (EdgeHTML) via Edge DevTools Protocol, please refer here.
- Setting breakpoints, including in source files when source maps are enabled
- Stepping through the code
- The Locals pane
- Debugging eval scripts, script tags, and scripts that are added dynamically
- Debugging web workers
- Any features that aren't script debugging.
For debugging inside VS Code:
- Install the extension
- Open the folder containing the project you want to work on.
For debugging Microsoft Edge (EdgeHTML) inside Visual Studio:
- Install a supported version of Windows.
- Install the latest version of Visual Studio. Debugging Microsoft Edge (EdgeHTML) is supported for VS versions >= 15.7
- Create an ASP.Net/ASP.Net Core Web Application.
- Select 'Microsoft Edge' from the 'Web Browser' submenu in the debug target dropdown, and then press F5.
We are actively working to add support for debugging Microsoft Edge (Chromium) to Visual Studio. Sign up here to stay updated!
Using the debugger
When your launch config is set up, you can debug your project. Pick a launch config from the dropdown on the Debug pane in Code. Press the play button or F5 to start.
The extension operates in two modes - it can launch an instance of Microsoft Edge navigated to your app, or it can attach to a running instance of Edge. Both modes require you to be serving your web application from a local web server, which is started from either a VS Code task or from your command-line. Using the
url parameter you simply tell VS Code which URL to either open or launch in Edge.
You can configure these modes with a
.vscode/launch.json file in the root directory of your project. You can create this file manually, or Code will create one for you if you try to run your project, and it doesn't exist yet.