Member Controls

Developers > MS C# EE - Plugins and Debugging
pljonesLink to postposted: Wed Apr 26, 2006 11:28 am
Avator for pljones

Member since:
 2005-04-02
From:
 London, UK
Posts:
 610
Okay, so I've downloaded the CD .iso, extract and installed the new C# 2005 IDE, converted PJSE over and now I want to run the built plugin, in debugging mode, within SimPe.

It doesn't appear to be possible.

The IDE complains that none of my projects are executables.  This is, of course, true -- they're all DLLs.

The 2003 Standard Edition IDE let me specify any executable to be run for debugging.  The 2005 EE IDE doesn't seem to have this option.

Does anyone know how to get this to work?
TheoLink to postposted: Wed Apr 26, 2006 11:50 am
Avator for Theo

Member since:
 2006-01-07
From:
 14.918246, -23.514862
Posts:
 75
Hi,

Here's the way to do it:

In VS2005, open your project properties.
In the Build tab, set the Output Path to the SimPe's plugins folder.
In the Debug tab, choose the "Start External Program" option and set it to SimPe's main executable.

When you start debug, it will build your plugin directly into SimPe's plugins folder, and start SimPe if the build is successful.

The catch is that the project's references must all be set to "Copy Local"=false, otherwise VS will copy all referenced dll's into the plugins folder.
pljonesLink to postposted: Wed Apr 26, 2006 12:18 pm
Avator for pljones

Member since:
 2005-04-02
From:
 London, UK
Posts:
 610
Theo wrote:
In the Debug tab, choose the "Start External Program" option and set it to SimPe's main executable.

I don't have that option in Express Edition, it seems.  Oh well...
Screen shot
quaxiLink to postposted: Wed Apr 26, 2006 12:37 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
The express edition does not seem to offer that Option in the GUI.

I work around it by specifing the SimPE Executable in the "post build".
TheoLink to postposted: Wed Apr 26, 2006 12:42 pm
Avator for Theo

Member since:
 2006-01-07
From:
 14.918246, -23.514862
Posts:
 75
In the ProjectName.csproj.user file, I have something like this:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DirectDebug|AnyCPU' ">
    <StartAction>Program</StartAction>
    <StartProgram>C:\Program Files\SimPe_059a_qa\SimPe.exe</StartProgram>
  </PropertyGroup>
</Project>


Can you edit the file (hoping the IDE won't change it :P), and see if the host program runs when debugging?

Edit: Quaxi's suggestion seems to be much easier :D
pljonesLink to postposted: Wed Apr 26, 2006 12:53 pm
Avator for pljones

Member since:
 2005-04-02
From:
 London, UK
Posts:
 610
Yeah, I just went in and hacked my csproj.user file and it seems to be working now -- just have to remembere to fix it up if the IDE ever notices and removes it.
Inge JonesLink to postposted: Wed Apr 26, 2006 1:25 pm
Avator for Inge Jones

Member since:
 2005-03-06
Posts:
 1899
Oh dear Peter your drum pad seems to have gone all square!


viewthread, 0, 0, MS-C-EE-Plugins-and-Debugging