Debugging multiple targets

I just connected up two G120 based modules. A Cobra 2 and a custom board.

I see 2 different devices in the debug setup. One is marked with (2) on the end and was the second device I connected.

I ran up 2 copies of VS2012 and I selected the 2 different devices so that the correct one was selected for each application. This is 2 different applications.

I started the first 1 and it gave an error and rebooted. When I tried to rerun it again, without checking the NetMicroframe tab, it started on the other unit and completely messed up the LCD config on that unit as it has a different LCD :frowning:

How can you debug more than 1 target and make sure VS stays on the selected device?

I would save some hair and use two different PCs. Desktop and a laptop for example

Or virtual machines…

I have had great success with premium devices and VMs. Raptor and VMs TBD.

I’ve got a busy enough desktop with 2 monitors and all the hardware to debug as it is but looks like this is the only workable solution. Pity really as I was able to run 2 copies of VS2012. It’s just that damn connection does not remain fixed and changes during reboot.

I might be able to setup a remote desktop to the Laptop though and put it’s screen on the second monitor. That might just work and would mean only 1 computer keyboard to edit from. :slight_smile:

That will work too :slight_smile:

I wish my desk was only that busy :wink:

While off topic, on a normal day I have anywhere from 2-4 monitors on my desk (not including laptops), 1 - 2 full-sized laptops, a netbook and a handful of devices such as beaglebone or raspberrypi.

Visual Studio has the ability to select the debugging target, outside of the project properties, but I have not used this much. If I need to test communications between two devices or I need to test a set of code in two different environments, I never take the chance of having what happened to you happening to me, so I setup yet another PC.

However, if you feel like there isn’t much of another choice, as stated earlier, then you should deploy your code (without attempting to attach the debugger) on both of your devices. Then, in Visual Studio 2012 go to Tools -> Attach to Process.

I’m debugging multiple targets pretty much daily. I could hardly say I have any issues with that…

Hi Simon,

It seems that you can have 2 different targets types and this works. eg, G120 and G400

What I can’t do is debug 2 of the same target. ie, G120 and G120 does not work and it ends up deploying to the wrong one on some occasions.

Did you try using FEZConfig to give the boards different names? Like G120_Client and G120_Server?

Hi James,

I didn’t know about that. I’ll give it a try.