setting the debugger for workspace

Added by Kevin Thacker over 5 years ago

When generating a workspace, how do I define what the debugger it will use?
So that when debug->go is done, it finds the correct debugger.

Some platforms have a debugger integrated into visual studio, so I need to be able to set this so it can be launched correctly and debugged.


Replies (3)

RE: setting the debugger for workspace - Added by Kevin Thacker over 5 years ago

replying to myself now I found what is put in the vcproj file.

So you need to set:

VSPLATFORMMAP to the platform name supported by the platform's VSI integration and VSNATIVEPLATFORM set to 1.

For pc and 360 you don't need to add anything.

For 4 other platforms you need to add a specific <Import> which references a specific .targets file, this brings in the debugger dialog.

So ideally when the workspace is generated it could read a platform specific bit of data from the config file, that text could then be injected into the vcxproj at the appropiate point. This would allow me to specify the data for each platform without having to hack the workspace generation code.

RE: setting the debugger for workspace - Added by Joshua Jensen over 5 years ago

Hack up a .vcproj/.vcxproj file with what needs to be added. Change it up some to not give away NDA'ed information. That will help me understand how this might be inserted.

-Josh

RE: setting the debugger for workspace - Added by Kevin Thacker over 5 years ago

Joshua Jensen wrote:

Hack up a .vcproj/.vcxproj file with what needs to be added. Change it up some to not give away NDA'ed information. That will help me understand how this might be inserted.

-Josh

the tail end of the vcxproj looks like this:

&lt;ItemGroup&gt;
&lt;ClCompile Include="Code1.cpp" /&gt;
&lt;ClCompile Include="Code2.cpp" /&gt;
&lt;ClCompile Include="Code3.cpp" /&gt;
&lt;ClCompile Include="Code4.cpp" /&gt;
&lt;/ItemGroup&gt;

this is the important line (modified of course to avoid NDA problems) - this brings in the debugger tab:

&lt;Import Condition="'$(ConfigurationType)' == 'Makefile' and Exists('$(VCTargetsPath)\Platforms\Console.Makefile.$(Platform).targets')" Project="$(VCTargetsPath)\Platforms\Console.Makefile.targets" /&gt;

this is the normal end..

&lt;Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /&gt;
&lt;ImportGroup Label="ExtensionTargets" /&gt;
&lt;/Project&gt;

The problem I found is that you can't have multiple lines like this. If you try, only one of the debugger's is visible (here I mean one of the console specific debuggers). It seems the .targets file either overrides the existing settings, or visual studio doesn't allow you to have multiple done in this way.

Because it requires VSPLATFORMMAP set to a name Visual Studio knows, and VSNATIVEPLATFORM=1 this means you effectively need that platform's VSI integration installed for the platform to be known by Visual Studio and for the debugger to be seen in this way.

I haven't looked into the .targets file to see the exact info it needs.

So, to make this with multiple consoles supported by the same workspace, you need a way to regenerate the project, and substitute the lines appropiate for that console.

(1-3/3)