镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Matlab error messages on run_code hard to debug #239

Open

Description

@brunobeltran

This is a fix that would greatly improve things like matlab_kernel. Could we (maybe only when requested by a flag) pass the matlab code to be executed to matlab in a line-by-line fashion? That way, if you have a 30 line script in a Jupyter notebook cell and you get back an "Index exceeds matrix dimensions" error, you can check which line caused the error?

As it stands, the fastest way to debug this kind of thing is to bisect the script by manually commenting out chunks of it at a time, which is pretty miserable. I could easily implement this if you like the idea but have no time.

To reproduce bug:

m = Matlab()
m.start()
m.run_code("""
a = 3;
% many lines of code
a(2);
% many more lines of code
""")

Activity

  1. lrq3000 commented on Apr 24, 2019

    @lrq3000

    I think this would be an amazing idea! No other bridge is doing that currently, and although this library is I think the easiest to debug (thanks to the extensive set of infos returned as a dict instead of failing with an exception), here with a step-by-step debugger it would be even better! This would certainly be a killer feature :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions