Stuart’s MATLAB Videos

Watch and Learn

Debugging Code Started from Windows System Prompt

I have a number of MATLAB functions that run daily, started from a batch file called by the Windows Task Manager. The .bat file contains lines like this calling the MATLAB executable with the -r option:


H:
cd "\Documents\My MATLAB Files"
call "C:\Program Files\MATLAB\R2019a\bin\matlab.exe" -r processCrawl_quit

Also, I always begin these functions with dbstop if error so I can troubleshoot if something goes wrong. Today this has happened and one of these functions has stopped at a breakpoint and I need to debug it.

I use dbup and dbdown to navigate the function stack as the workspace selector in the editor is not available.

Features covered in this code-along style video include:

Video Player is loading.
Current Time 0:00
Duration 8:44
Loaded: 1.90%
Stream Type LIVE
Remaining Time 8:44
 
1x
  • Chapters
  • descriptions off, selected
  • captions off, selected
  • en (Main), selected

    Play the video in full screen mode for a better viewing experience. 

    |
    • print

    Comments

    To leave a comment, please click here to sign in to your MathWorks Account or create a new one.

    Loading...
    Go to top of page