Why my parameters don't pop up in VS code? - visual-studio-code

I am new here. I tried to write a function in VS code, but when I start to write the parameters name in the function block, they don't pop up. Also like you can see in the print screnn, they also shown in white.
Someone know what is the reason?
btw, also I have some error, but I don't know what the VS code wants.
Thanks

Related

Visual Studio Code Extension Variable

Does anyone know if it's possible to write an extension in Visual Studio code that can write the values in the variables window to a file after each step while in debug mode. So, a step would happen, the variable would get written to a file, another step would happen, and the next set of variables would be written. Is there anything like this out there? Can it even be done?
Here's what I have so far:
1) I created an extension in VS code, and will write my functionality in the following provided method:
function activate(context) {
let disposable = vscode.commands.registerCommand('extension.helloWorld', function () {
// Display a message box to the user
vscode.window.showInformationMessage('Hello World!');
});
2) There are some variables offered here that could be relevant (such as debugger), but they throw errors when I use them.
To explain more clearly, what I would like to do is the following: create an extension in VS code that when used launches another instance of VS code (as does every extension), and within this new instance, load a user program, debug the program step by step, and write the variables at each step of the user program to a file. This main reason for even making the extension is the last step, as VS Code doesn't have any built in functionality to do anything like this that I know of. One issue is I am not sure the 'debugger' variable in the extension (or any variables) refer to the new instance, and if there is a way to do this.
If there is a better and smarter approach, I would love to hear it.
Thank you very much everyone in advance

Matlab rfplot not working

I'm trying to plot the S-Parameters in a file .s4p using the RFtoolbox but it seams that the function that I need rfplot doesn't work.
I searched which rfplot to see if the function exsits, and it is, but it's empty. I opened and inside I have this line:
narginchk(1,Inf)
error(message('MATLAB:UndefinedFunctionTextInputArgumentsType','rfplot',class(varargin{1})))
I tried also with other versions of Matlab (I have R2017a) where I work, but everyone have this kind of function.
Do you know why? Al the other functions of RFtoolbox work perfectly. How can I solve it if this problem is not related to my version?
The function exist, and the code exist too, but its hidden. Its a MATLAB proprietary code and they do not want you to know the real code behind it, so you can not see it.

how to run/view the output of a subsection of code in eclipse (beginner)

I am a complete beginner in java/eclipse/programming. I want to test small parts of my code to see if they are functioning in the way I want them to.
It is not intuitive to me from my first impressions of the program if/how I can run subsections of code. I also haven't yet found the answer to this problem online.
1) In eclipse, is it possible to highlight a couple of lines of code and view the output they would produce in the console?
2) If so, what are the step by step instructions to do this?
EDIT: I am running eclipse 4.7.0
Create a .jpage Scrapbook page (see Eclipse help: Creating a Java Scrapbook Page):
(via https://twitter.com/EclipseJavaIDE/status/882560433588240384)
The best way to do this is to keep your code modular or in other words make sure the different parts of your code are different functions. This way its simple to just run each function individually from your main function. In Java the main function is required so everything that you want to run has to somehow be triggered from whats in your main function.
Example in pseudo code:
some function{
code you want to run
}
other function{
other code you want to run
}
main function{
some function()
otherfunction()
}

Suppressing eyediagram() function's figure

In MATLAB, calling the eyediagram() function causes a figure to be created. Is there a way to not show the figure?
The arguments needed are internal to one of my functions. Which means, I have to use eyediagram() inside that function, and if a figure is going to show up I have to rename the title right after calling that function.
Is there a way to display the figure at some other place in the code.
It's an ugly hack, but you can disable Matlab's plotting before running the eye() function and re-enable it after the function. Something like the following might work:
set(0,'DefaultFigureVisible','off');
eyediagram(...);
saveas(gcf, 'myfig', 'fig'); # save it in a file myfig.fig
set(0,'DefaultFigureVisible','on');
And when you want to show it
open('myfig.fig')
You can probably come up with a method that won't require saving to a file -- but the above should get you started...

No breakpoints after gui figure copying?

Say, I have two following files:
A.m with matlab code that contains function callbacks and
A.fig with corresponding user interface file.
Now, I'm making copy of these two files:
A_copy.m
A_copy.fig
These two files were created by just copying the first ones. Now the questions is, why debugger does not stop inside callbacks? Inside other function debugger stops in its normal way, but not in callbacks. Of course, I've changed function name in A_copy.m from A to A_copy.
Which problem may I face?
Thanks.
Oh my God.
To fix this problem I had to go to main window editor properties and change NAME property. Just a string that contains title of the gui window. Why? Why? Why, Mathworks, WHY?
I can't believe it is made in so stupid way!