visual-studio-codemicrosoft-edge-chromium

Debugging JavaScript in Edge & VS Code causes DCOM 10016 Event / Access violation


Environment: Windows 10 IDE: Visual Studio Code Extensions: Live Server v5.7.5 by Ritwick Dey and Microsoft Edge Tools for VS Code v2.1.0

When I am debugging JavaScript files, if I put a break point in an exported class, I get the error shown in the image bellow.

I cleared the Windows System log, and right after I start debugging and get the error, a new entry is in the Windows system log. This happens every time without fail. The error in the Windows System log is:

    The application-specific permission settings do not grant Local Activation permission 
for the COM Server application with CLSID

    {2593F8B9-4EAF-457C-B68A-50F6B8EA6B54}

 and APPID 

    {15C20B67-12E7-4BB6-92BB-7AFF07997402}

to the user DOMAIN\\local_user SID (S-1-5-21-2158192427-3696246665-2163083460-1135) from 
address LocalHost (Using LRPC) running in the application container Unavailable SID
(Unavailable). This security permission can be modified using the Component Services
administrative tool.

My question is how do I fix this issue?

Access violation when debugging a class

Update 7/26/2022: If I remove the breakpoint from the constructor of the class and put it elsewhere in the class, it works without any errors. The error occurs if the breakpoint is in the constructor.


Solution

  • I found the answer and it is not anything above.

    Well, I finally solved the problem. I am updating this answer so that someone else will know the answer without going down all the wrong paths that I went down. The problems was not any of the tools. The problem was with the code. While technically the code was correct, executing it with a breakpoint caused the error I talked about above. I was able to fix this problem by moving all the class member variables to the top of the class before all member functions. The error only occurs when you add a breakpoint before the member variables are defined. Code analyzers say there is nothing wrong with the code. The error message could be more informative!

    If you want to see example code associated with this problem. See this post