How to get the debugging events working in a VB.NET Visual Studio project for RobotStudio addins
Prerequisite
To be able to make the project automatically copy your dll into the correct RobotStudio folder you need to run Visual Studio as Administrator. So to be able to take advantage of the instruction below you need to be local administrator on your machine.
Then right click the Visual Studio link and select Run As Administrator.
If you are not running as administrator you will get a build error when the copy fails.
If you do not have the correct privileges then you need to manually copy the dll to the RobotStudio addins folder, but you can still have the debug through the Start External Program.
Instruction
-
Right click the project and select [Properties]
-
In the [Debug] tab, make sure that the [Start external program] is set to the correct version of RS
-
In the [Compile] tab, click the [Build Events] button
-
In the [Post-build event command line] textbox enter
XCopy /y “$(TargetPath)” “C:Program FilesCommon FilesABB Industrial ITRobotics ITRobotStudioAddins” -
Set some breakpoints in your code.
-
Start Debugging [F5]
It will start RobotStudio automatically ?_" load the addin - and break at the breakpoints.