Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

"Debugging your JavaScript/TypeScript code when it runs on the server" in Azure App Service #1176

Closed
riiight opened this issue Aug 7, 2017 · 1 comment

Comments

@riiight
Copy link

riiight commented Aug 7, 2017

I believe I have an error in my code that is running in Node on the server. I see that the OP of this post has NodeServices debug statements such as the following being returned from their Azure App Service:

fail: Microsoft.AspNetCore.NodeServices[0]
      node.js:384

I attempted to use the instructions here to also get those debug statements but I believe those are not specific to Azure. Here's what's in my Startup.cs's ConfigureServices:

services.AddNodeServices(options => {
  options.InvocationTimeoutMilliseconds = 300000;
  options.LaunchWithDebugging = true;
  options.DebuggingPort = 9229;
});

But I am still not seeing those NodeServices debug statements. Can anyone help with this? Thx.

P.S. I noticed that NodeServicesOptions has NodeInstanceOutputLogger but couldn't find a way to hook that up with ASP.NET Core's dependency injection in the Startup.cs's ConfigureServices(). Any help with this is also appreciated.

@SteveSandersonMS
Copy link
Member

I'm not sure where you've been looking for the debug statements (in the browser's console, maybe?). They are emitted to stdout by your application process. If you're running in Azure, you should look in "Log Stream" under the "Monitoring" heading in your App Service.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants