-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip should show line number from experiment logic file #17
Comments
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington). This is the
You can see it saves the traceback as a string, intended for showing tracebacks during errors. There's a bit of work to do this sensibly since Instruction will have subclasses, and you don't want it to store merely the line number or traceback of the subclass's Could easily save line numbers too, using the insect module as you mentioned (rather than trying to parse it out of the traceback), though strictly speaking a traceback is more general since the same line number could be called from multiple locations if you are re-using a function. Or could include a line number and the full traceback so that the user could see just one at a glance and then only read the whole traceback if they want to. Definitely something to include in a way accessible to runmanager! |
Original report (archived issue) by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).
I've just had an idea to create mapping between each point in a runviewer trace, and the line number of the experiment logic python file that generated that point. That way, you could easily identify which bit of your experiment logic Python code was responsible for generating a particular feature you are seeing.
This probably should be implemented as part of the next major labscript version (and not before).
I probably don't suggest saving this information along side every hardware instruction, but rather store a separate table (or tables) in much the same way we do for markers and other metadata displayed in runviewer.
Some ideas for how to access this information are here and probably I would just suggest we put it in all of the labscript functions we expect to be called (that is, we want to know where the
channel.method()
was called, and not say where the wrapper functionmake_BEC
was called and also not whereOutput.add_instruction()
was called, which probably prohibits putting it inside the method of that name).The text was updated successfully, but these errors were encountered: