Unable to attach matlab.exe process to visual studio 2013 for debugging mex files? <p>I am writing some mex files to run in my matlab program using visual studio 2013 compiler.<br> In order to be able to debug your mex files, you should follow <a href="http://www.mathworks.com/help/matlab/matlab_external/debugging-on-microsoft-windows-platforms.html" rel="nofollow noreferrer">these steps</a><br> Everything was right just some minutes ago and I was doing my project without any problem.<br> Today I have typed the code </p> <pre><code>mex -g mx_minimum_power.cpp cvm_em64t_debug.lib </code></pre> <p>on command prompt many times and after getting the success message, I've attached matlab.exe to visual studio and through setting a break point, I've debugged my code.<br> But this time I suddenly ran into the following error and I don't know how to solve it.<br> <a href="https://i.stack.imgur.com/djKSM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/djKSM.jpg" alt="enter image description here"></a> </p> <p><a href="https://i.stack.imgur.com/Ogjvx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ogjvx.jpg" alt="enter image description here"></a> </p> <p>When I right-clicked on the third option and clicked <code>run as administrator</code>, I encountered the following message:<br> <a href="https://i.stack.imgur.com/lKCCx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lKCCx.jpg" alt="enter image description here"></a> </p> <p>Then if I choose <code>configure remote debugging</code>, I'll encounter:<br> <a href="https://i.stack.imgur.com/aF7AH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aF7AH.jpg" alt="enter image description here"></a> </p> <p>Now I have the following processes that are shown to be running. </p> <p><a href="https://i.stack.imgur.com/rBfnQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rBfnQ.jpg" alt="enter image description here"></a> </p> <p>and again:<br> <a href="https://i.stack.imgur.com/4Npeh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4Npeh.jpg" alt="enter image description here"></a> </p> <p>When I click on permissions or options for remote debugger: </p> <p><a href="https://i.stack.imgur.com/jsZm8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jsZm8.jpg" alt="enter image description here"></a></p>