Custom widget debugging vs. designer.exe
-
Hi,
What debugging do you have in mind ? Designer is just there to show what you designed. If you want everything integrated, you should use Qt Creator ?
@SGaist
I'd like to develop and debug the custom widget DLL in VS. I put "designer.exe" in the command field of the debugging option and launch the VS debugger. Unfort. designer.exe does not even load the plugin with debug informations.
I know, I can debug the custom widget itself, but not in combination with designer.exe. -
@SGaist
I'd like to develop and debug the custom widget DLL in VS. I put "designer.exe" in the command field of the debugging option and launch the VS debugger. Unfort. designer.exe does not even load the plugin with debug informations.
I know, I can debug the custom widget itself, but not in combination with designer.exe. -
QtDesigner is a WYSIWYG editor. In which way you think the Designer should debug something?
You dont need the Designer to debug your custom widget. The code should be enough@Pl45m4
I don't want to debug designer.exe, I just want to debug my plugin with the wrapper interfaces to designer. For instance I have a widget code which works perfectly when I dynamically add it to a form, but as DLL with the wrapper code it just crashes designer.exe, when I drag it on a widget form. I know, it has to do with the order the values get assigned, but why I can't simply debug it? -
@Pl45m4
I don't want to debug designer.exe, I just want to debug my plugin with the wrapper interfaces to designer. For instance I have a widget code which works perfectly when I dynamically add it to a form, but as DLL with the wrapper code it just crashes designer.exe, when I drag it on a widget form. I know, it has to do with the order the values get assigned, but why I can't simply debug it?@WWebber said in Custom widget debugging vs. designer.exe:
I don't want to debug designer.exe, I just want to debug my plugin with the wrapper interfaces to designer
Yeah sure... but that's still a code thing.
when I dynamically add it to a form, but as DLL with the wrapper code it just crashes designer.exe, when I drag it on a widget form
and the
designer.exe
itself will most likely not find the issue why the plugin doesn't work. You'll need to debug your plugin in debug mode with VS.
Does enablingQT_DEBUG_PLUGINS
show anything? -
@SGaist
I'd like to develop and debug the custom widget DLL in VS. I put "designer.exe" in the command field of the debugging option and launch the VS debugger. Unfort. designer.exe does not even load the plugin with debug informations.
I know, I can debug the custom widget itself, but not in combination with designer.exe.@WWebber said in Custom widget debugging vs. designer.exe:
I know, I can debug the custom widget itself, but not in combination with designer.exe.
and you cant find anything wrong there?!
One thing you could do is something like this:
TBH, I have not much experience in writing Qt Designer plugins but it seems that you need to handle every case, no matter how unlikely it might be.
(Check for variable initialisation, nullpointers, indices and their limits, etc.).
If QtDesigner finds an edge case while loading / initialising your plugin and it doesn't work, the Designer might crash. -
@WWebber said in Custom widget debugging vs. designer.exe:
I know, I can debug the custom widget itself, but not in combination with designer.exe.
and you cant find anything wrong there?!
One thing you could do is something like this:
TBH, I have not much experience in writing Qt Designer plugins but it seems that you need to handle every case, no matter how unlikely it might be.
(Check for variable initialisation, nullpointers, indices and their limits, etc.).
If QtDesigner finds an edge case while loading / initialising your plugin and it doesn't work, the Designer might crash. -
@Pl45m4
Ok. But this is the way how we developed >30 Years ago! Try and error, adding debug outputs,.. but under MSDOS everything ran a lot faster ;) Thx. I will not waste any further time with it - was just a question.@WWebber said in Custom widget debugging vs. designer.exe:
But this is the way how we developed >30 Years ago! Try and error, adding debug outputs
But as you can see from the linked StackO post, the Designer plugin made Designer crash because it seemed that according to OP, the Designer passed unexpected parameters to a function which wasn't handled in the plugin and caused the crash
-
@WWebber said in Custom widget debugging vs. designer.exe:
But this is the way how we developed >30 Years ago! Try and error, adding debug outputs
But as you can see from the linked StackO post, the Designer plugin made Designer crash because it seemed that according to OP, the Designer passed unexpected parameters to a function which wasn't handled in the plugin and caused the crash
You can debug a designer plugin by using a designer executable built in debug mode - otherwise the application will not load the plugin (debug <-> release mismatch) - worked fine for me.
-
You can debug a designer plugin by using a designer executable built in debug mode - otherwise the application will not load the plugin (debug <-> release mismatch) - worked fine for me.
Just for me to know: But this cant be done when using the Designer from QtCreators Designer tab, right?! You have to build/compile Designer by yourself for that?! Or how to do this?
-
Just for me to know: But this cant be done when using the Designer from QtCreators Designer tab, right?! You have to build/compile Designer by yourself for that?! Or how to do this?
@Pl45m4 When you have a debug version of QtCreator you can also do this in QtCreator.
QtCreator does not launch a new executable to show/edit the ui files so you have to debug QtCreator then. -
Re: How to: Create custom designer widget using Visual Studio
Is there really no way to debug a custom widget when opened from designed.exe with visual studio?
There are certain situations, where custom widgets work perfectly, when dynmically created in a QT application, but the designer.exe crashes. -
@WWebber you will find your answer on how to debug it all in here
I tried it myself and it helped a looot
https://www.youtube.com/watch?v=CuDccvMWCcg@tataeress
?
he does not explain how to debug my plugin hosted by designer.exe..