remote debug macOS to windows

Answered

Hello,

I have an application that was made with asp.net framework 4.5.2. I work with a macbook pro and use Parallels to run a VM with Windows and run this application on IIS. Recently, I am testing Rider, and for my surprise, I can build this application in Rider.

So, I put the folder of the application in a shared folder which can be accessed by mac and windows, and point the IIS to this folder. Worked well :)

But sometimes I need debug. So, I saw that Rider has the remote debug feature. I set one SSH in my windows VM and I got connect. The problem is that when I try to debug, I get the message:

 

and when I put any breakpoint:

Any ideas if what I am trying is possible and what i should to do?

Thank you a lot and sorry for my english errors.

14 comments
Comment actions Permalink

Hello!

Please, enable "Debugger" tracing in the menu "Help | Trace Scenario (LOGS)", reproduce the issue once more and share Rider logs (Help | Compress Logs and Show in Finder) via https://uploads.services.jetbrains.com (let me know the exact name of the uploaded file)?

Seems, that the problem might be in paths.

 

Kind regards,

Sofya.

 

0
Comment actions Permalink

Hello Sofia,

File uploaded: rider-logs-20190718-103631-remote-debugger-mac-windows.zip

Thank you in advance.

0
Comment actions Permalink

Hi!

Rafael, thanks for the uploaded file.

Eugen, thanks for the issue.

 

We will keep you posted about updates.

 

Sofya.

0
Comment actions Permalink

Hello,

 

Any news on this case?

 

Thank you

0
Comment actions Permalink

Hello Rafael
Could you please try the latest Rider 2019.2. We've made a lot of changes in the Debug system. Please, let me know if the problem persists.

Kind regards,
Sofya.

0
Comment actions Permalink

Hi Sofia,

Unfortunately it doesn't work in last build. In additional I had lose an ability of remote connection to one of my windows instance, on another error persist.

0
Comment actions Permalink

Hi Sofia,

Now, almost works! :D

Look, seems like are working, but when I try step over(F10), he just resume program(F5).

I am trying to understand, maybe I am doing something wrong, because is showing "Could not get symbols":

 

Thank you :)

0
Comment actions Permalink

I think this is happen because to get build on Mac, I changed the debug type, because I was getting build failed:

 

So, I just create a configuration without debug:

 

I tried change the option Debug symbols for true, and select PDB only or Full, I clicked in Ok, and got the same error. When I back to the configuration, is showing "Portable" again.

Maybe I will only get this when my application is asp.net core

There's a way to build with debug?

 

Thank you

0
Comment actions Permalink

Hello Rafael, 

You are right, you got "Could not get symbols" because of Debug type = None. The correct value should be "Full." So, the question is why you cannot build your project with this debug type.

Could you please share

1. a screenshot of "Preferences | Build, Execution, Deployment | Toolset and Build."

2. the type of your project (it would be [erfect to have a csproj).

0
Comment actions Permalink

Hello Sofia,

Sorry for the delay to answer...

But just to confirm, Rider is on Mac and the project is on .NET Framework 4.5.2, so I think would be impossible to debug this project, even if the debug mode is remote, right?

Thank you

0
Comment actions Permalink

Hello Sofia Byzova , today I tried to that: https://stackoverflow.com/questions/43155991/invalid-debug-option-build-error-visual-studio-for-mac

And works! So, I dont need anymore to debug remote, because now I can build my .asp.net Web api application on mac, even with debug type "portable".

But now, I have 2 problems: 

  1. When I hit my api on postman, I get status 200 but I am receiving nothing in the body response of http request. And in Run tab I get:

    Listening on port: 5000 (non-secure)
    Hit Return to stop the server.
    System.Web.HttpException (0x80004005): The request body is incomplete.
    at System.Web.HttpRequest.MakeInputStream () [0x0035d] in <cae9d09b4c754647a304cf9c64ca35a7>:0
    at System.Web.HttpRequest.get_InputStream () [0x00008] in <cae9d09b4c754647a304cf9c64ca35a7>:0
    at System.Web.HttpRequestWrapper.get_InputStream () [0x00000] in <cae9d09b4c754647a304cf9c64ca35a7>:0
    at Microsoft.Owin.Host.SystemWeb.CallStreams.InputStream.ResolveStream () [0x00096] in <392be445bb6947f2a5f768f7860b8204>:0
    at Microsoft.Owin.Host.SystemWeb.CallStreams.InputStream.get_Stream () [0x00000] in <392be445bb6947f2a5f768f7860b8204>:0
    at Microsoft.Owin.Host.SystemWeb.CallStreams.DelegatingStream.get_CanRead () [0x00000] in <392be445bb6947f2a5f768f7860b8204>:0
    at System.IO.StreamReader..ctor (System.IO.Stream stream, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean leaveOpen) [0x00021] in <b4d1a66727f44ba888b54966284fabb4>:0
    at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(System.IO.Stream,System.Text.Encoding,bool,int,bool)
    at Microsoft.Owin.OwinRequest.ReadFormAsync () [0x0003f] in <5decccfc95e44573a9e45d83dbe60e91>:0
    at Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerHandler.InvokeTokenEndpointAsync () [0x000ef] in <1e8753a61f0546ce9291786e5aca724e>:0
    at Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerHandler.InvokeAsync () [0x002bf] in <1e8753a61f0546ce9291786e5aca724e>:0
    at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1[TOptions].Invoke (Microsoft.Owin.IOwinContext context) [0x00109] in <f9be925b4bc648358fe1d2df64fcfd52>:0
    at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1[TOptions].Invoke (Microsoft.Owin.IOwinContext context) [0x00183] in <f9be925b4bc648358fe1d2df64fcfd52>:0
    at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1[TOptions].Invoke (Microsoft.Owin.IOwinContext context) [0x00183] in <f9be925b4bc648358fe1d2df64fcfd52>:0
    at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1[TOptions].Invoke (Microsoft.Owin.IOwinContext context) [0x00183] in <f9be925b4bc648358fe1d2df64fcfd52>:0
    at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1[TOptions].Invoke (Microsoft.Owin.IOwinContext context) [0x00183] in <f9be925b4bc648358fe1d2df64fcfd52>:0
    at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.RunApp (System.Func`2[T,TResult] entryPoint, System.Collections.Generic.IDictionary`2[TKey,TValue] environment, System.Threading.Tasks.TaskCompletionSource`1[TResult] tcs, Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult result) [0x0007e] in <392be445bb6947f2a5f768f7860b8204>:0
    at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.DoFinalWork (Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult result) [0x0007d] in <392be445bb6947f2a5f768f7860b8204>:0
    at Microsoft.Owin.Host.SystemWeb.Infrastructure.ErrorState.Rethrow () [0x00000] in <392be445bb6947f2a5f768f7860b8204>:0
    at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End (System.IAsyncResult ar) [0x0001d] in <392be445bb6947f2a5f768f7860b8204>:0
    at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.EndFinalWork (System.IAsyncResult ar) [0x00006] in <392be445bb6947f2a5f768f7860b8204>:0
    at System.Web.AsyncInvoker.<doAsyncCallback>b__8_0 (System.Object ores) [0x00007] in <cae9d09b4c754647a304cf9c64ca35a7>:0

     

  2. When I put a breakpoint in anywhere I get:

 

Could you help me? Should I create a new post? 

Thank you a lot in advance

0
Comment actions Permalink

Hi Rafael,

Thank you for the update.
1. This error seems to be not connected to Rider. Anyway, we can try investigating logs. Please collect them and share them in a new youtrack issue. 
2. Please try deleting /bin and /obj directories in your project folder, then rebuild the project and check if the issue persists. If so, enable "Debugger" tracing in "Help | Trace Scenarios (LOGS)", reproduce it once again, and share collected logs also in a new youtrack issue.

Thanks in advance.

0
Comment actions Permalink

Hello Sofia,

Oh, sorry, I did not think about that's not connected to Rider. You are right, and maybe it's just some dependency of my project that cannot run in Mono. I just don't know if there's a way to know why it's not working. Anyway, thank you a lot.

 

0

Please sign in to leave a comment.