Matlab, Ubuntu: preview and local scope not accessible while debugging nested scripts - matlab

everyone!
I am running Matlab R2016a on my Ubuntu 14.04.
I have a main script that calls some user-coded functions. As long as I debug the main script, the preview of the variables while hovering on them works fine and the variables shown in the workspace are accessible as usual.
As soon as I start debugging the nested functions, none of the previous aids work. The preview doesn't show up and the workspace is not updated with the local variables. Also, if I try to open any of the variables with the variable editor, the editor opens but it doesn't show anything.
Does anybody have a clue?
Thank you in advance.

Ok, I figured it out.
In the function script that I wanted to debug there were definitions of multiple functions. By placing each definition in a separate file the debugger works as fine as usual.
I guess that Matlab is not capable of debugging scripts with multiple function definitions because it becomes impossible to distinguish (or represent) the different scopes in one window, especially if the local variables have the same name.
Thanks anyway!

Related

Eclipse Pydev interactive console use inside functions

What are the best practices for developing with the Eclipse Pydev interactive console once code migrates inside a function?
I heavily use the interactive console as my projects are typically experimental, open-ended, and not spec-driven. The interactive console works well for code in the main loop, but as soon as I migrate that code to a function, I only know to use breakpoints with the debug view. However, that seems unwieldy, and I don't need the entire stack, nor error-catching mechanisms.
Is there a way to have the vanilla pydev environment interactive console inside a function, for example on the first breakpoint, or raised error?
Without this, I typically have to copy the function back into the main loop. Then, I end up using the same variable names, which leads to occasional global variable name accidents when I copy back to a function.
Thanks in advance.

Openoffice BASIC: Macros assigned to buttons are not working on other computers.

So I have noticed that my codes in OpenOffice Calc (BASIC) are only working on my own computer. The macros are offcourse stored in the file and can be accessed through the Macro Organizer on any other computer (they even run through the Macro Organizer). Even then, they can only be assigned to a button on these other computers if I copy the code and paste it on Mymacros. I have already set the Macro Security Settings to Medium so it does not seem to be the problem.
The code is also not a problem. Even a simple macro such as:
Sub Main
Msgbox ("hello")
End Sub
assigned to a Button present the same behavior on other computers.
I created another Library apart from the standard one and saved the macro there. This allowed the macros to run in every computer.

How do I show Variable Bindings in SICSTUS' "SPIDER" IDE?

I'm using the "SPIDER" IDE for SICSTUS Prolog development, as instructed by the SICSTUS Manual and the documentation on the SPIDER IDE itself. When debugging, under the 'SICSTUS Debugging' perspective, the variables do not show on the Variables window, as can be seen in the top right in the image shown here (it's the first thing in the Spider page)
I set up everything according to this guide and this is, as far as I can tell, the only thing not working. Are there any additional steps to get the variable bindings while debugging?
Thanks in advance,
edit: I've recently reinstalled everything in the same system after formatting a drive, and it now works perfectly. I have no idea what, but I assume I did something wrong the first time.
Variable bindings should work by default. However, some variables may be omitted depending on compiler optimizations and other factors. Try it with the example program shown in the SPIDER image.

How to fill textboxes on a website with MATLAB

I'm trying to use MATLAB to fill in textboxes on a webpage in Internet Explorer without typing directly into the URL. Can anyone explain to me how to do this? I'm pretty lost. I really appreciate any help you can give me.
Thanks!
While I have seen this done before (i.e. running a MATLAB script that automatically fills in fields in Internet Explorer), to the best of my knowledge, I do not believe that there is an actual MATLAB command to directly interface with IE.
Instead, you can make use of the MATLAB command system to call an external program that actually does the interfacing with IE.
For example, you might be able to make a Visual Basic program that interfaces with IE through the InternetExplorer object. I'm not too familiar with VB, but this doc might help. Once you've created this program, use MATLAB's system command to execute it (passing command-line arguments to define what/how to fill in the textboxes).
Take a look at the doc for system for more info.
I've done it many times with a small program called Autohotkey.
With this program you can write a script, that will move the mouse / click the keyboard. you can pass string arguments and use it inside the script. once done, you can call this script from matlab.

Flex Builder Debugger doesn't display local variables

I am using the Flex Builder 3 debugger almost every day and it's starting to be a real pain that the 'Variables' tab in the 'Flex Debugging' view doesn't show local variables, only 'this' is displayed.
Also I can not add Watch Expressions for local variables.
Am I forgetting something here or is the debugger just very limited?
Thanks
I have the same problem that motto described. Local variables are not displayed when debugging, "hover" method doesn't work either. You can always use trace() or Loging API.
The problem occurred to me yesterday and the only thing I noticed is that the project stopped to compile using ant script due to OutOfMemoryError (I usually build project using FB, but sometimes FlexBuilder doesn't show errors/warnings and compiling via ant script is the only way I know to find them).
To see if Flex Builder is even tracking your local variables properly, set a breakpoint somewhere in a function. Once you hit that breakpoint, you can also "hover" over a variable in your source code, and a tooltip should show the current value of that variable.
Sometimes, FB has problems if the current function is further down in a larger file. Moving the function code up solves the problem (but exposes the same for another funciton further doen then). It seems that FB can only gather a certain amount of metadata for the currently open file.