Because I did not find any information in regard settings to be used to debug an rF2 plugin with VisualStudio I was conserned that this is, like in rFactor1, not possible as well.
The good news is that you can use the debugger of VisualStudio to develop rF2 PlugIns. I used "VisualStudio Express 2010" (German) to do the settings - but had to upgrade to "VisualStudio Express 2013" change the language. To verify the installation I just used the InternalPlugIn Demo from the DevCorner of rF2.
Here is my brief description on how to get the debugger running.
Assuming VisualStudio is installed on your computer you need to execute the following steps:
(1) Download and unpack the InternalPlug-Demo from the rF2 website (http://downloads.imagespaceinc.com/rf2/plugin/InternalsPlugin6.zip) in a separate directory (do not recommend to unpack in rFactor directories).
(2) Start VisualStudio and open the Microsoft visual studio solution file named "InternalsPlugIn" which is located in the Win32 sub-directory.
(3) Visual Studio will convert the format to the current format.
(3) Afterwards open the project setting by doing a right-click on the project and select "Properties"
View attachment 14028
(4) Change Configuration Properties for General and Debugging.
View attachment 14029
View attachment 14030
Steps you have to do every time you start debugging:
(4) Compile and start debugger. When the rFactor_Launcher has started, start rFactor as you normaly do (I recommend windowed mode).
(5) After rFactor has started go in VisualStudio to the menu "Debug/Attach to Process". And Attach the rFactor2 Exe.
View attachment 14031
If you set some breakpoints (and did everything right) rF2 should stop execution and you are able to go step-by-step through your code, watch variables, etc. Just like you excpect it if you ever have developed software within an IDE. If rF2 does not stop execution and VC seems to ignore breakpoints you very likely missed to do Step 5 ;-)
I assume that the profiler will run as well but did not test so far.
If there any questions, this information was helping or was unclear in same areas please let me know by just posting into this thread.
The good news is that you can use the debugger of VisualStudio to develop rF2 PlugIns. I used "VisualStudio Express 2010" (German) to do the settings - but had to upgrade to "VisualStudio Express 2013" change the language. To verify the installation I just used the InternalPlugIn Demo from the DevCorner of rF2.
Here is my brief description on how to get the debugger running.
Assuming VisualStudio is installed on your computer you need to execute the following steps:
(1) Download and unpack the InternalPlug-Demo from the rF2 website (http://downloads.imagespaceinc.com/rf2/plugin/InternalsPlugin6.zip) in a separate directory (do not recommend to unpack in rFactor directories).
(2) Start VisualStudio and open the Microsoft visual studio solution file named "InternalsPlugIn" which is located in the Win32 sub-directory.
(3) Visual Studio will convert the format to the current format.
(3) Afterwards open the project setting by doing a right-click on the project and select "Properties"
View attachment 14028
(4) Change Configuration Properties for General and Debugging.
View attachment 14029
View attachment 14030
Steps you have to do every time you start debugging:
(4) Compile and start debugger. When the rFactor_Launcher has started, start rFactor as you normaly do (I recommend windowed mode).
(5) After rFactor has started go in VisualStudio to the menu "Debug/Attach to Process". And Attach the rFactor2 Exe.
View attachment 14031
If you set some breakpoints (and did everything right) rF2 should stop execution and you are able to go step-by-step through your code, watch variables, etc. Just like you excpect it if you ever have developed software within an IDE. If rF2 does not stop execution and VC seems to ignore breakpoints you very likely missed to do Step 5 ;-)
I assume that the profiler will run as well but did not test so far.
If there any questions, this information was helping or was unclear in same areas please let me know by just posting into this thread.
Last edited by a moderator: