I am trying to debug a .Net application running on remote machine from my local dev. machine. I am getting an error saying MSVCP140.dll is missing
Details:
Dev. machine: Visual Studio 2015, Windows 7
Remote machine: Windows Server 2012 R2, Visual Studio Remote Tools for 2015 installed.
On remote machine, I configured the Remote Debugger with "no authentication" and port 4020.
In dev. machine's Visual Studio Attach to Process window, configured as below:
Transport: Remote (no authentication)
Qualifier: remote_machine_name:4020
As I click on Refresh button, it lists remote machine's processes. While on remote machine, the Visual Studio Remote Debugger window shows that user_name connected.
As soon as I attach to the remote machine's process in Visual Studio, it enters into the debug mode, but symbols remain unloaded.
Interestingly, on the remote machine I got an error message: "The program can't start because MSVCP140.dll
is missing from your computer.
Try reinstalling the program to fix this problem."
Though, the file MSVCP140.dll
exists in the path of msvmon.exe
file.
Solution 1: Reinstall the App Step 1: Click on Start and select Settings. Step 2: Select Apps from the menu tiles. Step 3: Click on the app causing the error and select Uninstall. Step 4: Restart your computer, then reinstall the app by downloading it from the vendor's website or Microsoft store.
MSVCP140. dll is also called as Microsoft® C Runtime Library, which belongs to Microsoft Visual C++ Redistributable Packages for Visual Studio® 2015. Therefore, although MSVCP140. dll is not an essential system file of the Windows operating system, it is required for running programs developed with Visual C++.
In a developer command prompt, you can use the mspdbcmf.exe tool to generate a full PDB from this limited PDB. In Visual Studio, use the Project or Build menu items for generating a full PDB file to create a full PDB for the project or solution.
To start debugging within the program just insert import pdb, pdb. set_trace() commands. Run your script normally, and execution will stop where we have introduced a breakpoint. So basically we are hard coding a breakpoint on a line below where we call set_trace().
I was able to get the Visual Studio 2015 Remote Debugger to work by adding the directory where msvcp140.dll resides on the remote host to the remote host environmental variable "path" variable and restarting the remote debugger on the remote host.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With