If you want to set the default script debugger in Windows 11 or Windows 10 PC, here is how you can do that. For your information, you need to use the Windows Registry Editor to get it done.
When it comes to script debugging in Windows, you have a variety of options to do. Internet Explorer itself is a good way to carry out script debugging. Personally, I use it to debug scripts, and it works great in this field. But yesterday, my friend installed Visual Studio on my machine. Visual Studio, on its own set itself as the default debugger. Now the issue was that I was not aware of how to debug using Visual Studio at the moment. And there was some urgent debugging work I had to carry out.
So the question was, how I could deselect Visual Studio as the default debugger and choose the native Microsoft Script Debugger, in using which I was comfortable. Then I did the registry trick mentioned below which helped me significantly in achieving my objective. Using this trick, you can easily select any program as a script debugger, make sure it can do so.
Set Default Script Debugger in Windows 11/10
1. Press Windows Key + R combination, type put Regedt32.exe in Run dialog box and hit Enter to open the Registry Editor.
2. Navigate to the following location:
HKEY_CLASSES_ROOT\CLSID
3. In the left pane of this location, right-click over key CLSID and select New -> Key. Name the newly created key as:
{834128A2-51F4-11DO-8F20-00805F2CD064}
Now create the subkey to this newly created key and name it LocalServer32.
Now came to the right pane of this subkey LocalServer32 or registry location:
HKEY_CLASSES_ROOT\CLSID\{834128A2-51F4-11DO-8F20-00805F2CD064}\LocalServer32
Double click on the (Default) string (REG_SZ) there. The Value data of this string manages the default script program for Windows. You’ll now get this:
4. In the above box, put the Value data as the file location of the program which you desire to be as default script debugger.
For example, to restore native Microsoft Script Editor, I put the Value data as C:\Program Files\Microsoft Script Debugger\msscrdlbg.exe.
Here C: is necessarily the system root drive. When you’re done inputting Value data, click OK and you may now close the Registry Editor and reboot the machine to get results.
How do I enable script debugging?
First of all, you need to use Visual Studio to enable script debugging in Windows 11 or Windows 10 PC. For that, open the app and go to Tools > Options > Debugging. Here you can find an option called Enable JavaScript Debugging for ASP.NET. You need to enable or turn on this option. For your information, it works with Edge and Google Chrome.
How do I disable script debugging in Windows 11/10?
If you use Windows 10, you can disable script debugging using Registry Editor. You can go through the aforementioned path: HKEY_CLASSES_ROOT\CLSID, create a new key named: {834128A2-51F4-11DO-8F20-00805F2CD064}, a subkey named LocalServer32 and enter the Value data of the program path. However, if you use Windows 11, there is no such option since you need to use Visual Studio to turn on or off the script debugging.
Trust it helps you someday!