remote debugging xp embedded - how

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luker
    New Member
    • Aug 2009
    • 6

    remote debugging xp embedded - how

    Hello Experts,

    I am writing an application for a device running windows xp embedded. I want to code on my developer pc and deploy the running executable to the embedded device.

    - The two boxes are linked directly by a network cable.
    - Both are in the same subnetwork and are able to ping each other.
    - Each box is sharing a directory.
    - Each box has a remotely shared directory opened in an explorer window.
    - The development pc is in a domain "ATWORK".
    - The development pc contains two network interface cards. One is connected to the company network, the other one to the embedded device.

    The embedded device runs Visual Studio Remote Debugging Monitor configured as
    [v] Windows Authentication
    [ ] No Authentication (native only)
    und
    [ ] Allow any user to debug

    Visual Studio 2008 Pro 90-Day-Trial is configured with
    Project Properties -> Build -> Output Path [Z:\path\bin\Deb ug]
    and
    Project Properties -> Debug -> [v] Use Remote Computer: MyUserName@Embe ddedDeviceName

    On the embedded box, I created a user account (administrator) using the same name as the one on my developer pc.

    F6 causes the project to build and deploy the executable to the desired directory on the embedded device.

    F5 does the same.
    Additionally, Remote Debugging Monitor logs "Date Time EmbeddedDeviceN ame\MyUserName connected."

    Debugging fails showing the error message
    "Fehler beim Ausführen des Projekts: Das Debuggen kann nicht gestartet werden. Visual Studio Remote Debugger auf dem Zielcomputer kann keine Verbindung mit diesem Computer herstellen. Fehler bei der Authentifizieru ng. Weitere Informationen finden Sie in der Hilfe."
    since I am living in Germany. The english pendant should be something similar to
    "Error executing project: Could not start debugging. Visual Studio Remote Debugger on the target machine cannot establish connection to this computer. Authentication Error. Consult help for further details."

    Sadly, I didn't find the matching detail in Visual Studio's help.

    How is remote debugging supposed to run?

    Remote device can connect to developer pc's shares. But Remote Debugging Monitor can't connect to Visual Studio.

    How can I solve this?


    luker
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    It took me a while to get this same type of thing going between my host OS and VMware OSes running on the same PC.

    A couple things to check:
    1) the target PC should have the firewall off
    2) the target PC and the host PC should be logging in with the identical user and password. This one actually tripped me up because I had *changed* the user on the target PC to match the host PC. That won't work! You have to have matching users that were *created* exactly the same.

    This blog on using VMware may help as it is the same type thing

    Comment

    • luker
      New Member
      • Aug 2009
      • 6

      #3
      Hello tlhintoq,

      1) Yes, the target firewall is off.
      For testing purposes, I disabled the host firewall as well, without any effect on my problem.
      2) Yes, I created a new user account on the target PC. It is administrator and has the same name and password as on the developer PC.

      Maybe the problem has to do with the developer PC in a domain and the target PC not. But I don't know how to get around that.

      Comment

      • luker
        New Member
        • Aug 2009
        • 6

        #4
        Debugging on a network drive - how to prevent SecurityExcepti on

        You know: "If the error message changes, then you're right"

        In Visual Studio's properties, I changed all paths from "Z:\..." to "\\192.168. .." and the program indeed seems to debug.

        Though, it doesn't run properly yet. I get an exception in Form1's constructor:
        Code:
        public Form1()
        {
            InitializeComponent();
        }
        InitializeCompo nent() throws a SecurityExcepti on. It looks exactly like debugging a project that's located on some network drive.

        I tried signing with a strong name, but I have to use some assemblies without such a strong name and if I got it right, this combination doesn't work.


        How can I grant the necessary security level to my project?

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          I'd start by finding out which component is throwing the exception.
          After all... InitializeCompo nent() is a method in your Form1.designer. cs for setting up your form's buttons, textboxes and other design elements. I'd be really surprised if one of them threw a securityExcepti on unless it is a more complex component that normal. Do you have a UserControl on there that is trying to do something on create like access a database or network folder, or the registry?

          Comment

          • tlhintoq
            Recognized Expert Specialist
            • Mar 2008
            • 3532

            #6
            In Visual Studio's properties, I changed all paths from "Z:\..." to "\\192.168. .." and the program indeed seems to debug.
            Path consistency is vital. All of my VS projects are on an external drive. I had to make sure all my computers and laptop see that drive as 'K:' so none of the references break. In VMware virtual computers I did a mapped drive back to the shared host external so the VM's saw it as a network drive on 'K'

            Comment

            • luker
              New Member
              • Aug 2009
              • 6

              #7
              solved

              I got a tip to install .NET3.5SP1 on the target.
              Even though I use .NET2.0, that works for the SecurityExcepti on.

              Comment

              • tlhintoq
                Recognized Expert Specialist
                • Mar 2008
                • 3532

                #8
                Originally posted by luker
                I got a tip to install .NET3.5SP1 on the target.
                Even though I use .NET2.0, that works for the SecurityExcepti on.
                Very cool. Thanks for sharing that. One of those goofey things that one wouldn't think of right away.

                Comment

                Working...