WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Plug-in development (https://forum.worldviz.com/forumdisplay.php?f=8)
-   -   Howto debug a custom plugin? (https://forum.worldviz.com/showthread.php?t=1961)

reedev 04-10-2009 03:31 AM

Howto debug a custom plugin?
 
Hi,

I have trouble getting my plugin to work and I would like to debug it somehow. I realize that the plugin package that one can download only contains the release libs but maybe you have other ways to debug as well. All the info I get now is "winviz.exe has stopped working". I am on Vista.

Also, my classes are working nicely when I use my own-built osg 1.2, both debug and release mode. The plugin is only a very thin wrapper around these classes so essentially I use very little plugin specific code.

Thanks in advance for any pointers/tips!

regards
Raymond

Gladsomebeast 04-14-2009 02:09 PM

You can build a debug plugin.

Setup your debug build just like the release build. I seem to remember needing to make a copy of python24.lib and renaming it python24_d.lib because of a statement in python.h.

Now when you get the crash message, click the debug button. Check the call stack for your plugin code if you crash in some other .dll's machine code.

reedev 04-23-2009 01:59 PM

Hi,
That's interesting! Would that mean that I can attach my VS to a running vizard? I'll try when I have time...

regards
Raymond

Gladsomebeast 04-23-2009 02:16 PM

Its been a while, but I remember setting break points and stepping through plugin code. Don't remember how I did that though.

You can try setting up the 'Debugging' project properties to run the winviz.exe with a test script as an argument. The test script should load and use your plugin of course.


All times are GMT -7. The time now is 07:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC