-
Notifications
You must be signed in to change notification settings - Fork 4
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
debug with qt graphic toolkit windows #24
Comments
Hi Hendrik, do you need to run octave-gui to use QT plotting? What are the octave commands that generate the plots? I'm trying to understand if the two are dependent. Can you post a trivial sample program that exemplifies this use case? Cheers. |
Hello Paulo, I'm pretty sure this example isn't trivial any more, but unfortunately you need certain parts of it to get the programm running. My actual project is very similar to this one.
|
Morning Paulo, for Win i have to use the octave.vbs to open the GUI version of Octave So i've changed my script accordingly .
Now Visual Studio Code keeps loading and loading, nothing seems to happen... I've tried to modify the octave.vbs
For command line this change is working and the octave.vbs command is starting the octave-gui --no-gui version, but VSC is still loading, no change here. |
I don't have time to test it on windows right now. Maybe this weekend. But maybe this will help. Try setting |
I believe you don't need to give it a try on windows. I've added the following to system environment variables:
and now it's starting with Qt. One more question, is the slider working for you? Normally the callback function is recalculation the whole plot after using the slider...
|
You might want to add the following code to the end of your file just for debugging:
The point is that if the code runs to the end, vscOctaveDebugger will terminate octave-gui as part of its cleanup. So you can't exit while you're debugging. But you also can't pause execution or else the GUI will not update. So, as a workaround for debugging you can add that loop. It updates the UI 60 times a second. You can remove it when you're done with the debugging. Or you can add a button that changes a boolean variable that controls the loop if you want to get fancy. |
Jupp, using the loop for refresh is working well. |
Great, I'm glad it works for you. I'm opening the bug again because because the loop is just a workaround and I want to fix the issue. When I have time I'm planning to debug octave-gui and try to figure out what might be going wrong. |
I'm still not sure why qt seems to block on I/O. Maybe the rendering thread also handles I/O. I would have to check the actual implementation on octave-gui, but I don't really have time right now so I'm closing this bug for now. 😕 |
Hi,
first of all, thanks for providing this extension. :)
I like to use the qt toolkit for ploting an advanced figure with buttons and sliders. It's possible to start the octave-cli with qt, when using "octave-gui --no-gui" as cmd command.
https://octave.org/doc/v4.4.0/Command-Line-Options.html
Therefor I've tried the same with your tool:
"octave": "C:/Octave/Octave-5.1.0.0/mingw64/bin/octave-gui --no-gui"
Error Message:
Could not connect to 'C:/Octave/Octave-5.1.0.0/mingw64/bin/octave-gui --no-gui'! Check path.
only using "octave-gui"
"octave": "C:/Octave/Octave-5.1.0.0/mingw64/bin/octave-gui"
Error Message:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
I've also tried to modify the Runtime.js to add this command parameter:
code snipped from Runtime.js:
start(program, workingDirectory) {
this._program = program;
this.addFolder(path_1.dirname(program));
this.cwd(workingDirectory);
// This is just like a deferred sync command.
// The program executes and then echoes the terminator tag.
const terminator = this.echo(Runtime.TERMINATOR);
this.execute(
${fsutils_1.functionFromPath(program+" --no-gui")};${terminator}
);Error Message:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Is there an option to add command parameters? Or are there other methods to solve this issue?
Greetings
The text was updated successfully, but these errors were encountered: