Developing plugins in C#: unable to debug

Discussions concerning programming of SOFTIMAGE©
Post Reply
MikeM
Posts: 17
Joined: 23 Jun 2013, 23:11

Developing plugins in C#: unable to debug

Post by MikeM » 24 Jun 2013, 16:17

Hi,

I am trying to develop plugins in C# for softimage, I tried with VS 2010 Express.

First brick wall with the express version of VS, it doesn't have anything like "devenv", instead I tried launching vcexpress.exe from the softimage console, but I am not sure if that does what devenv would.

Either way, I can build (in x64) with VS2010 and load the dll just fine in Softimage 2013.

The Softimage documentation talks about using VS 2010, so I tried with the 2010 express version but it doesn't allow attaching to a process for debugging.

So I switched to VS 2012 express which allows to attach to a process for debug, however I can't get it to work, I am not sure if I am missing something or if its an incompatibility problem with VS 2012, I am still able to compile the dll and it functions perfectly but I am not able to debug, which is a bummer when I can't get an error to figure out what I did wrong.

I have tried to debug as explained in the documentation loading the dll compiled in Debug, I set break points before attaching to the process and starting debugging in VS, after the plugin is loaded in softimage and its command called from softimage nothing happens in VS, I am not getting any pauses on breakpoints.


Any ideas on how to solve this? anyone coding with VS2012 Express to confirm if its compatible with softimage?

Thanks

User avatar
rray
Moderator
Posts: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Developing plugins in C#: unable to debug

Post by rray » 24 Jun 2013, 17:17

Devenv is just the executable filename of VS 2010, vcexpress should work just as fine.
I've had some issues with not being able to hit breakpoints when I had the sourcecode inside the plugins folder, which is where the cmd wizard drops it by default.
Moving it away from there and setting the project output path to the plugins folder then worked (after attaching to process or setting xsi.exe as the startup executable)

I've moved away from c# btw because it turned out to be slower than the scripting languages, and needed a recompile for each single version it was supposed to run on (2013 Sp1 Sp2, 2014, 2014 sp1...)
softimage resources section updated Jan 5th 2024

MikeM
Posts: 17
Joined: 23 Jun 2013, 23:11

Re: Developing plugins in C#: unable to debug

Post by MikeM » 24 Jun 2013, 18:22

Thanks for the quick reply, I am having that issue of the "not being able to hit breakpoints", I tried moving the project folder away from the plugins folder and having xsi as the startup process, though still can't get it to debug.

Either way, I was trying with C# precisely for performance and cleaner code, I have written a model exporter (for the SMD format) in Jscript and was now writing an importer but its pretty slow, since the format is ascii and not binary there's lots of strings to parse, also I need to loop through the triangles array to convert it to the polymesh format (comparing and discarding duplicate vertices in triangles since SMD is triangulated) right now it takes 30 seconds to load (10 000 triangles) just vertices and polygons (no normals, uv, weights... yet) but I'll look into faster array/looping methods to get better performance, its not crucial since this is just a plugin I am making on my free time for fun/learning.

I'll take your advice on avoiding C# for SI, it doesn't seem to be the most productive way, having to reload the plugin for every compile, I would move to C++ but I am just a 3D artist having fun coding scripts and learning slowly.
I just started getting a decent grasp of C# so moving to C++ so soon would be pretty challenging and time consuming before I can actually code without wondering how to do something every 2 lines of code.

I heard that Python in SI is a bit slower than the others, so I am guessing I might be better sticking to Jscript for now?

On that note, and sorry for deviating from the original subject, since I'll probably stick to Jscript, I am not able to get the jscript debugger to launch, I have been using logmessage to debug so far :ymblushing:,

I have installed the microsoft script debugger, enabled the Enable External Script Debugger and set breakpoint sin my script, yet the bugger still doesn't launch, I even checked the windows registry the "jitdebug" key is indeed set to 1, anyone know how to get the debugger working for Jscript?

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests