Skip to content

Conversation

@gregg-miskelly
Copy link
Contributor

This commit contains Andrew's changes for pipeTransport attach rebased on master.

This commit contains Andrew's changes for pipeTransport attach rebased on master.
@gregg-miskelly
Copy link
Contributor Author

@WardenGnaw please do a quick review

Copy link
Contributor

@WardenGnaw WardenGnaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Also tested it on my end and it works.

@rajkumar42
Copy link
Contributor

👍

@gregg-miskelly gregg-miskelly merged commit 58c5b8d into dotnet:master Nov 12, 2016
DustinCampbell added a commit that referenced this pull request Nov 12, 2016
Implement support for using pipeTransport with attach (#918)
@munyirik
Copy link

Are there detailed instructions somewhere on how to set this up? I want to attach to a dotnet core app running on an IoT Core device.

@WardenGnaw
Copy link
Contributor

@gregg-miskelly has written an example here.

@munyirik
Copy link

I get a strange error in the remote-attach output when I F5...

Executing: "C:\Users\munyirik\Desktop\putty\plink.exe'" "-pw xxxxx" "administrator@xxxxx" "uname && if [ $(uname) == "Linux" ] ; then ps -axww -o pid=,comm=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,args= ; elif [ $(uname) == "Darwin" ] ; then ps -axww -o pid=,comm=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,args= -c; fi"

The command works when I run in in a cmd window.

Also I'm doing a self-contained deploy. Do I need to do anything extra to get clrdbg to work?
Thanks!

@gregg-miskelly
Copy link
Contributor Author

@munyirik do you mean Windows IoT Core?

@gregg-miskelly gregg-miskelly deleted the pipeAttach branch November 29, 2016 00:37
@munyirik
Copy link

Yes I did

@gregg-miskelly
Copy link
Contributor Author

gregg-miskelly commented Nov 29, 2016

@munyirik the process listing code that we have is only for Unix. You can explicitly add the process id, and I think that would work. Alternatively you could use VS + msvsmon.

@munyirik
Copy link

Doesn't look like I can put the Id explicitly...

Unable to start debugging. Launch options string provided by the project system is invalid. Name cannot begin with the ''' character, hexadecimal value 0x27. Line 5, position 55.

I'm working on an update to https://marketplace.visualstudio.com/items?itemName=ms-iot.windowsiot.
The extension allows users to easily copy files to a remote IoT Core device (and run commands e.g. to start a dotnet app). What's missing is a way to attach the debugger.

@gregg-miskelly
Copy link
Contributor Author

@munyirik based on your error message I think you did something wrong. You want something like this (see 'processId').

        {
            "name": ".NET Core IoT Remote Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "1234",
            "pipeTransport": {
                "pipeProgram": "c:\\mytools\\plink.exe",
                "pipeArgs": [ "-i", "c:\\users\\greggm\\ssh-key.ppk", "greggm@1.2.3.4", "-batch", "-t" ],
                "debuggerPath": "c:\\clrdbg\\clrdbg",
                "pipeCwd": "${workspaceRoot}"
            },
            "sourceFileMap": {
                "/home/ExampleAccount/ExampleProject": "${workspaceRoot}"
            }
        }

Assuming this works, well enough, I would add --

  1. You might want to think more about launch then attach since attach is kind of painful (need to enter the process id every time).
  2. If you are interested in improving this, we are happy to take a PR to add a ${command.pickRemoteWindowsProcess}. You can follow this PR as an example. Shouldn't be too hard.

@munyirik
Copy link

Thanks I'll try that. Where can I get a copy of clrdbg from that I can copy to my device?

@gregg-miskelly
Copy link
Contributor Author

@munyirik good point. I was thinking you could just use the Windows version, but in thinking about this more, I realized that this isn't going to work - our Windows version isn't designed to run on OneCore Windows. Lets talk more offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants