How I insert a breakpoint in a Matlab Library?

8 views (last 30 days)
Hello,
this is my first time I ask a question on this Forum so hello to all.
I'm developing a .NET Assembly library with Matlab which it will be used in a Visual Studio application. I would like to learn how to insert a breakpoint in a function on Matlab and, next, running it with VisualStudio the program stop on this breakpoint and let me execute step by step the library's function. Thanks for all.
Regards,
Miguel

Answers (1)

Friedrich
Friedrich on 16 Jan 2013
Edited: Friedrich on 16 Jan 2013
Hi,
thats not possible. The only product/Environment where this works is MATLAB Buidler EX. What I normally do is the following:
  1. Modify the MATLAB Code in such a way that all variables inside that function are stored in a MAT file.
  2. Compile the MATLAB Code and run in from Visual Studio
  3. After running it, the MAT file is created. So go back to the MATLAB side, execute your function and load the MAT file to get the values you had when running it deployed.
  4. Step through the code and spot the error/issue
  5. Fix it and compile again
  6. accept this answer ;)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!