If you could not use MATLAB desktop on server, you have no other choice but to use MATLAB command line version. Here are some notes of mine:
1. Running MATLAB on server without GUI
matlab -nodesktop
2. Debugging MATLAB script
Some official reference: https://www.mathworks.com/help/matlab/ref/dbstop.html
https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html
# test.m is a demo script
>> dbstop in test
Use dbstep
to execute the current line of the file.
Use dbstop in test at line_index</