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

Commit a3bcc0d

Browse files
Update debugger detection to support Node v8.1+, and stop aborting if debugger messages are unrecognised.
1 parent 5e7bb0f commit a3bcc0d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Diff for: src/Microsoft.AspNetCore.NodeServices/HostingModels/OutOfProcessNodeInstance.cs

+5-10
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,6 @@ private void ConnectToInputOutputStreams()
381381
{
382382
OutputLogger.LogWarning(evt.Data);
383383
}
384-
else if (!initializationIsCompleted)
385-
{
386-
_connectionIsReadySource.SetException(
387-
new InvalidOperationException("The Node.js process failed to initialize: " + evt.Data));
388-
initializationIsCompleted = true;
389-
}
390384
else
391385
{
392386
OnErrorDataReceived(UnencodeNewlines(evt.Data));
@@ -400,10 +394,11 @@ private void ConnectToInputOutputStreams()
400394

401395
private static bool IsDebuggerMessage(string message)
402396
{
403-
return message.StartsWith("Debugger attached", StringComparison.OrdinalIgnoreCase) ||
404-
message.StartsWith("Debugger listening ", StringComparison.OrdinalIgnoreCase) ||
405-
message.StartsWith("To start debugging", StringComparison.OrdinalIgnoreCase) ||
406-
message.Equals("Warning: This is an experimental feature and could change at any time.", StringComparison.OrdinalIgnoreCase) ||
397+
return message.StartsWith("Debugger attached", StringComparison.Ordinal) ||
398+
message.StartsWith("Debugger listening ", StringComparison.Ordinal) ||
399+
message.StartsWith("To start debugging", StringComparison.Ordinal) ||
400+
message.Equals("Warning: This is an experimental feature and could change at any time.", StringComparison.Ordinal) ||
401+
message.Equals("For help see https://nodejs.org/en/docs/inspector", StringComparison.Ordinal) ||
407402
message.Contains("chrome-devtools:");
408403
}
409404

0 commit comments

Comments
 (0)