Code covered by the BSD License  

4.5 | 2 ratings Rate this file 17 Downloads (last 30 days) File Size: 5.71 KB File ID: #39549 Version: 1.7
image thumbnail

Visual Studio Toolbar for mex interface with video tutorial


Stefan Karlsson (view profile)


20 Dec 2012 (Updated )

Seamless interface, VS 2010 and 2012 and Matlab for MEX. Video linked to step you through.

| Watch this File

File Information

Automatically sets up debugging and running of MEX files from Visual Studio.
There is now a visual studio extension (simple click plugin type of install):

The old type of Macros (that are not supported in newer versions of Visual Studio) are kept in the same zip file.

Video tutorial on my page:

On youtube:

MATLAB release MATLAB 7.10 (R2010a)
MATLAB Search Path
Other requirements Visual Studio 2010, for the submission file. Follow the link: for a version that works on 2010 OR 2012
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
23 Nov 2015 Stefan Karlsson

Stefan Karlsson (view profile)


Sorry for the late reply. You probably have a setting for building 32 bit applications by default, even though you are on 64 bit system.

If i remember correctly, then VS2010 comes shipped with two different versions of the debugger, one for 64, one for 32 bit.

I wont help you out unfortunately, because I no longer have a single computer with Windows, nor will I ever have one again. Best, Stefan

Comment only
27 Aug 2015 Calum

Calum (view profile)

This looks great. Unfortunately I get an error using the Debug function on 64 bit OS, any ideas? I'm using VS 2010 and Matlab 2013b, Windows 7 64 bit.

"The 32-bit version of Visual Studio Remote Debugging Monitor (MSVSMON.EXE) cannot be used to debug 64-bit processes"

Comment only
16 Dec 2014 Stefan Karlsson

Stefan Karlsson (view profile)


Thanks for your interest, and for sharing how you solved the issue. Sounds like it is a question of varying security settings, and thus nothing that I can do anything about. Great that the solution is so simple.

To reiterate:

Tools->Options->Addin/Macros Security

add the full path of the "Matlab Tools20xx.vsix" file.

Comment only
09 Dec 2014 Jim

Jim (view profile)

I use Matlab R2014B 64bit and VS2010 Pro under Windows XP Pro 64bit (SP2).

After following your instructions I had a slight difficulty in using the vsix plugin;
'View' worked ok, but the other commands 'Run','RunFast' and 'Debug' all reported 'No process is associated with this object'.

To fix this I needed to explicitly 'Add' the path to the 'vsix' plugin file to VisualStudio Tools->Options->Addin/Macros Security.


06 Mar 2014 Stefan Karlsson

Stefan Karlsson (view profile)


Thanks for your feedback. As this submission is all about avoiding boring stuff... I dont expect many people to give a rating or feedback on this submission.

Hope you find it useful, happy coding!

Comment only
04 Mar 2014 Thomas Clark

Used the VS2012 extension.

Works seamlessly, thank you very much.

It took me a long time to figure out how to do this for IFC on Linux, I wasn't relishing the process of working out the same thing on VS2012 for an entirely different platform!

21 Dec 2012 Stefan Karlsson

Stefan Karlsson (view profile)

videos here:

Comment only
21 Dec 2012 1.1

Added the link to the videos

26 Dec 2012 1.4

- Only one open session of the thin matlab in the background.
- Added save check of current document

26 Dec 2012 1.3

Quick Fix previous upload.

26 Dec 2012 1.2

1. Added a macro "CompileWMatlab", which only compiles and builds the code in matlab.
2. Added remarks at the top of the VB file that details how to install the macros.
3. tidied up the example mex files

31 Dec 2013 1.5

There is now a visual studio extension, instead of just Macros. Simple click install for both VS 2010 and 2012

03 Mar 2014 1.6

updated the video tutorial

05 Oct 2014 1.7

Just changed the description to include VS 2012, which is fully supported

Contact us