Skip to content

Commit

Permalink
handle case when attaching instead of launching debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamYoblick committed Jan 25, 2021
1 parent b5e38ce commit c5dccf7
Showing 1 changed file with 10 additions and 6 deletions.
Expand Up @@ -203,12 +203,16 @@ public sealed class DebugAdapterLauncher : IAdapterLauncher {
launchJson.DebugStdLib = debugService.DebugStdLib;
launchJson.ShowReturnValue = debugService.ShowFunctionReturnValue;

try {
var adapterLaunchInfoJson = JObject.Parse(adapterLaunchInfo.LaunchJson);
AddVariablePresentationOptions(adapterLaunchInfoJson, launchJson);
} catch (JsonReaderException) {
// this should never happen
Debug.Fail("adapterLaunchInfo is not valid json");
// adapterLaunchInfo.LaunchJson can be null when attaching to a remote process
if (adapterLaunchInfo.LaunchJson != null) {

try {
var adapterLaunchInfoJson = JObject.Parse(adapterLaunchInfo.LaunchJson);
AddVariablePresentationOptions(adapterLaunchInfoJson, launchJson);
} catch (JsonReaderException) {
// this should never happen
Debug.Fail("adapterLaunchInfo is not valid json");
}
}

var excludePTVSInstallDirectory = new PathRule() {
Expand Down

0 comments on commit c5dccf7

Please sign in to comment.